Data Representation In Computer Lecture - 02 Number System And Concepts of programming
2. Data Representation In Computer
- Number System:
The number system contains few symbols called digits. These symbols represent different values, depending on the position they occupy in a number. The popular number system used a Decimal number system with base 10 because it has ten symbols or digits. (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
Binary Number System is like a decimal number but with base 2 as it has two symbols or digits (0 or 1). Every computer store numbers, letters, and other special characters in binary form.
Oral Number System has base 8 as there are only eight symbols or digits (0, 1, 2, 3, 4, 5, 6, 7,).
Hexadecimal Number System has been 16 as there are 16 symbols or digits. The first 10 digits are the same digits of decimal number system - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and remaining six digits are denoted by the symbols A, B, C, D, E, F for values 10, 11, 12, 13, 14 and 15.
All numbers or symbols can be converted from one form to another by following specific rules.
- Concepts of Programming
The instructions that tell a computer how to carry out the processing task are referred to as programs. While writing a program a sequence has to be followed known as instruction sequence or logic which should be correct. That's why the planning of a program is important. Planning implies defining logic and that logic is termed as an algorithm. The algorithm is a step-by-step description of how to arrive at a solution to a given problem. It is a sequence of instructions which are executed in a specified sequence to get the output.
Algorithms can be represented as programs, flowcharts, and Pseudocode.
An algorithm represented in the form of a programming language is a program.
A flowchart is a pictorial representation of an Algorithm.
A flowchart uses boxes of different shapes to denote different types of Instructions.