BASIC Programming Language

 

Welcome to class!

In today’s class, we will be talking about BASIC programming language. Enjoy the class!

BASIC Programming Language

BASIC Programming Language classnotes.ng

BASIC Language/Simple language

A computer language is a special language understood by a computer. It consists of various commands that we give to the computer to do any work.

BASIC (an acronym for Beginner’s All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages whose design philosophy emphasizes ease of use.

A computer language is a set of words, symbols and codes that are used to write a computer program. The process of writing these instructions (program) is called PROGRAMMING. The people who write these programs are called PROGRAMMERS.

Human beings understand a variety of spoken languages (English, Hausa, Igbo and so on) but computer cannot understand these languages. Computer can only understand one language, that is the machine language.

Computer uses machine language to carry out their jobs. This language uses binary digits, 0 and 1, which stand for ‘off and on’ condition of the electric current. It is difficult for the programmer to write the program directly in terms of these digits. So, they write their program in a language called Programming Language.

Programming language code programs in such a manner that the computer can understand them and decode (translate) them into its machine language.

Categories of programming language

There are a number of programming languages available nowadays. Some languages are developed for a specific computer, others were developed for specific uses, such as scientific or business application.

Programming languages are classified into two major categories.

Low-level language:

They are written to run one particular computer and cannot be easily used on another computer. These languages are difficult for a common programmer to learn

  • Machine Language: A machine language is a language directly understood by a computer without any translator. It refers to 0’s and 1’s that the computers understand as instruction. Due to this reason, it is also called a low-level language or the first-generation language. Writing or coding of programs in the 1s and 0s of the machine can be boring and can take a lot of time.

A machine language program written in assembly language uses a short sequence of letter called mnemonic code like A for addition, C for comparison, L for loading and M for multiplying. As the computer only understands machine languages, you have to convert these mnemonic codes to machine language (0s and 1s). To convert these mnemonic codes into machine language requires the use of translators. An assembler is a program used to translate assembly language into machine language so that the computer can understand it.

High-level language:

A high-level language has instructions which are similar to English language. It is very user friendly. It is much easier to understand and write with a program using this language. The greatest advantages of these languages are their independence. A program written in HLL can be used on almost all computers without any change. The instructions written in HLL are also converted into machine language with the help of translators. Interpreter and compiler are two programs used to translate a high-level language into machine language so that the computer can understand it.

Third generation language:

Third generation language uses English – like words to make it easy for the programmer to write the program. For example, a programmer writes ADD for addition and PRINT for print. Many third-generation languages also use arithmetic operation such as * for multiplication and + for addition.

A third-generation program is called a source program, which must be translated into machine language before the computer can understand it. Compiler and interpreters are the programs used to perform the translation for third-generation language. BASIC, COBOL, PASCAL, and FORTRAN are example third-generation language.

Fourth-generation language:

The fourth-generation language also uses English like a statement. A fourth-generation language is fast and requires much less time and effort on the part of the programmer. Fourth-generation language is so easy that the user with very little program background can develop programs while using it. VISUAL BASIC, ORACLE, JAVA e.t.c are examples of the fourth-generation language.

Natural language:

A natural language program does not follow a specific set of rules, unlike the fourth generation language. A natural language sometimes called fifth generation language is a type query language that allows the user to enter request that resembles the speech. Natural languages are often associated with an expert system and artificial intelligence.

Evaluation

  1. Explain BASIC Programming Language
  2. Mention and explain the categories of programming Language

These systems are popular in the medical field but are not widely used in business application.

Some high-level programs
  1. BASIC: It stands for Beginner’s all-purpose symbolic instruction code. It is a programming language used by beginners
  2. LOGO: It stands for Language of Graphics Oriented. It is a programming language used to draw different shapes and figure.
  3. COBOL: It stands for common business-oriented language. This language is specially designed for business application
  4. FORTRAN: It stands for ‘Formula Translation’. It is one of the oldest high-level languages. This language was designed to solve scientific problems
  5. C AND C++: They are the general-purpose programming languages popular on minicomputer and microcomputer. They are the most widely used language for developing commercial applications.
  6. JAVA: Java is a programming language developed to write programs. It helps in creating games and animation and in developing multimedia effect for the internet.
Typical basic keywords
Data manipulation:
  1. LET: assigns a value (which may be the result of an expression) to a variable.
  2. DATA: holds a list of values which are assigned sequentially using the READ command.
Program flow control:
  1. IF … THEN … ELSE: used to perform comparisons or make decisions.
  2. FOR … TO … {STEP} … NEXT: repeat a section of code a given number of times. A variable that acts as a counter is available within the loop.
  3. WHILE … WEND and REPEAT … UNTIL: repeat a section of code while the specified condition is true. The condition may be evaluated before each iteration of the loop, or after.
  4. DO … LOOP {WHILE} or {UNTIL}: repeat a section of code Forever or While/Until the specified condition is true. The condition may be evaluated before each iteration of the loop, or after.
  5. GOTO: jumps to a numbered or labelled line in the program.
  6. GOSUB: jumps to a numbered or labelled line, executes the code it finds there until it reaches a RETURN Command, on which it jumps back to the operator following the GOSUB – either after a colon, or on the next line. This is used to implement subroutines.
  7. ON … GOTO/GOSUB: chooses where to jump based on the specified conditions. See Switch statement for other forms.
  8. DEF FN: a pair of keywords introduced in the early 1960s to define functions. The original BASIC functions were modelled on FORTRAN single-line functions. BASIC functions were one expression with variable arguments, rather than subroutines, with a syntax on the model of DEF FND(x) = x*x at the beginning of a program. Function names were originally restricted to FN+one letter.
Input and output
  1. PRINT: displays a message on the screen or other output device.
  2. INPUT: asks the user to enter the value of a variable. The statement may include a prompt message.
  3. TAB or AT: sets the position where the next character will be shown on the screen or printed on paper.
Miscellaneous
  1. REM: holds a programmer’s comment or REMark; often used to give a title to the program and to help identify the purpose of a given section of code.
  2. USR: transfers program control to a machine language subroutine, usually entered as an alphanumeric string or in a list of DATA statements.
  3. TRON: turns on a visual, screen representation of the flow of BASIC commands by displaying the number of each command line as it is run. The TRON command, largely obsolete now, stood for, TRace ON. This meant that command line numbers were displayed as the program ran, so that the command lines could be traced. This command allowed easier debugging or correcting of command lines that caused problems in a program. Problems included a program terminating without providing the desired result, a program providing an erroneous result, a program running in a non-terminating loop, or a program otherwise having a non-obvious error.
  4. TROFF: turns off the display of the number of each command line as command lines run after the command TRON has been used.
  5. ALT+CTRL+DEL: For re-booting a computer
Evaluation
  1. What is a computer language?
  2. The process of writing instructions for the computer is called?
  3. List and explain the various categories of programming languages.
  4. List and explain the types of High-Level programs.

 

In our next class, we will be talking about Computer Hardware and Software. We hope you enjoyed the class.

Should you have any further question, feel free to ask in the comment section below and trust us to respond as soon as possible.

Ready to make school management and growth easy? Book your free onboarding session now

Get more class notes, videos, homework help, exam practice on Android [DOWNLOAD]

Get more class notes, videos, homework help, exam practice on iPhone [DOWNLOAD]

5 thoughts on “BASIC Programming Language”

  1. This website was really helpful.thank you for the information.i even got to know things that I never knew before 😍😘😁

Leave a Reply

Your email address will not be published. Required fields are marked *

Don`t copy text!