# Computer Languages & Number Systems Exercises

Chapter 3 Computer Languages and Number Systems offers the solved exercises of Computer subject Class VII Aditya Birla Public School curriculum

Topics Covered

## Chapter 3 Computer Languages & Number Systems Exercises

1. F
2. Program
4. Machine
5. Compiler

### True/False

1. True
2. True
3. False –> An octal number can have digits from 0 to 7.
4. True
5. False –> Only compiler convert source code to object code, interpreter doesn’t.

### MCQs

1. ii. 31
2. iv. All of them
3. ii. 82.21
4. i. 101111
5. i. Windows 10

## Short answer questions (2/3 marks) – Computer Languages & Number Systems Exercises

[1] What is coding?

Coding is a process of writing a program using certain programming languages to develop an app, a game, or a software.

[2] What is a computer language?

A computer language is a system of commands used to develop programs for computer.

In other words, A computer language can be considered as a communication medium between hardware and users of computer through different scripts called programs.

[3] What is a program? What is a syntax?

A program is a sequence of statements or a script written in a particular language to give commands to fulfil user need.

Syntax is the method of writing the program. In other words, rules which are to be followed by writing program called syntax.

[4] What is source code and what is object code?

The script of a particular program is called source code. A source code will be written by a programmer or a developer.

An object code is converted code of a program by a system software. This code is converted into machine code by the compiler.

[5] Enlist some popular language translators.

There are three translators:

1. Compiler
2. Assembler
3. Interpreter

#### Number System

[6] What is a number system?

Numbers are important part of any system. The representation method of numbers is called a number system.

[7] What are the three important factors of any number system?

The three important factors of any number system are:

1. The Base
2. The Position
3. The Digits

[8] Write the base of following number systems: 1) Binary 2) Octal 3) Decimal 4) Hexa-decimal

1. Binary – 2
2. Octal – 8
3. Decimal – 10
4. Hexa-decimal – 16

[9] Write steps to convert a number from binary to decimal.

1. Count and write the position of each digit from right side
2. Multiply the digit with the positional value raised by the power
3. Sum up the values calculated in step 2

These steps are application to integer parts only.

[10] Write steps to convert a number from decimal to binary.

1. Divide the number with base i.e. 2
2. Record the remainder
3. Read numbers from bottom to top

## Long answer questions (5 marks)

[1] What are the computer languages? Explain all of them in brief.

There are three computer languages:

1. Machine Language (Low-level language)
2. Assembly Language
3. High-level Language

#### Machine Language

Machine language is a primary language of computers. It is in the form of 0s and 1s. It is executed directly without any translators in computers.

#### Assembly Language

It was developed in 1950s to understand the by users. As binary language cannot be understood by everyone. So assembly language uses few of the words in English and writes the code. It requires a translator to convert the program in machine language is called assembler.

#### High level language

There are certain limitations of assembly language. So high-level languages emerged to fulfill the need. This language contains user readable words and statements and required to translate in machine language. Compiler and Interpreter are popular translators used with a high-level language. Some of the popular high-level languages are C,C++, Java, Python etc.

[2] What are the stages of a program execution?

The program execution involves following stages:

1. Pre-processing
2. Compilation

#### Pre-processing

It is the process of preparing a program for compilation. The source code made available in this stage for compiler to execute.

#### Compilation

Compilation refers to testing the program for the errors. The source code put on compiler for testing and produces the results if no errors are there.

Linking is a process to convert the object code converted in compilation and generate the executable file.

When the program is ready, it needs to be loaded in to the memory for future use. This process is known as loading.

[3] Convert following number into decimal:

1. (1011011010.1100)2
2. (12345.456)8