Computer Languages and Syntax, Study notes of Programming Languages

The three categories of computer languages based on their complexity and the importance of following syntax while writing a computer program. It also discusses the role of language translators in converting high-level languages to machine code. a worksheet with questions related to the lesson.

Typology: Study notes

2021/2022

Uploaded on 05/11/2023

gail
gail 🇺🇸

4.9

(10)

222 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
pf3

Partial preview of the text

Download Computer Languages and Syntax and more Study notes Programming Languages in PDF only on Docsity!

Worksheet -3 Subject: - Computers Class: - VI Teacher: - Mrs. Suudha Sharma Name: _________________ Class & Sec: ________ Roll No. ______ Date: 25.04.

Lesson 2: Language and Software Story

The Computer Language

A language is medium to communicate with each other. We use components (symbols,

words...) of a language according to certain rules defined by the language. This is called

syntax of a language. Each language has its own syntax. Similarly, while writing a

computer program it is important to follow this syntax, otherwise the computer will

not be able to understand our instructions. Computer languages can be classified in

the following three categories based on complexity of the language:

1. Machine Language

2. Assembly Language

3. High Level Language

1. Machine Language: Thee machine language is the

elementary language of a computer which consists of only

two digits called the Binary digits (0 and 1). The Machine

language is directly accepted and executed by the

computer.

2. Assembly Language: In this language, binary operation codes are

replaced by the Mnemonics. For example:

If in Machine language, the operation code to add is “0010”than,

In Assembly language its equivalent is ‘ADD’

Remember: Machine and Assembly languages are also called low

level languages as they are linked with the hardware.

3. High Level Language: High Level Languages (HLL)

are programming languages designed for users to

write instructions in English like statements (for e.g.:

c = a + b) rather than in the Machine Language or

using Mnemonics. FORTRAN, C and Java are few

examples of HLL. We need language translators

(compilers or interpreters) to change HLL code to

machine code so that it could be understood and

executed by the computer.

Remember: HLL are considered to be

third generation language.

Mnemonics are abbreviations or symbols, which are needed to be

translated into machine language to get executed. This is done by

the assembler.

Machine Language 0010 Assembly Language ADD High Level Language C = a + b

Now, answer the following questions:

Q.1. Write (T) for True and (F) for False against the statements:

  1. The Machine Language is the elementary language of the computer.
  2. 1 and 2 are also called binary digits.
  3. Learning HLL is more difficult than learning the Machine Language.
  4. A Compiler changes the HLL into Machine Level Language.

Q.2. Fill in the blanks:

  1. The Machine Level Language consists of _____________ and _____________.
  2. In _____________languages, you can write instructions in English like statements.
  3. A Compiler or an Interpreter converts HLL into _____________.
  4. ________is the component of language according to certain rules defined by the language.

Q.3. Answer in one word/sentence.

  1. Classify computer languages.
  2. Which computer language is the most simplest?
  3. Which language is directly accepted and executed by the computer?
  4. What are mnemonics?

Q.4. Solve the crossword using the hints given:

3 5 1

2 4

Across

  1. Java and FORTRAN are __________ level languages.
  2. This language uses mnemonics. Down
  3. 0 and 1 are ___________ numbers.
  4. Machine and Assembly languages are also called _____ level languages.
  5. Each language has its own ____________.