3. Computers only understand the numbers.
How Number system works?
when we enter data, the data is converted into
electronic pulse.
Each pulse is identified as code and the code is
converted into numeric format by ASCII.
It gives each number, character and symbol a
numeric value (number) that a computer
understands.
Number Systems
4. • Binary number system
• Octal number system
• Decimal number system
• Hexadecimal number system
Binary number system
It has only two digits '0' and '1'
so its base is 2.
Each digit is called a bit.
A group of four bits (1101) is called a nibble
A group of eight bits (11001010) is called a byte.
Number Systems - Types
5. • The digit value in the number system is calculated
using
– The digit
– The index, where the digit is present in the number.
– Finally, the base numbers, the total number of digits
available in the number system
When the number system represents a digit from 0 - 9,
the base of the number will be 10.
Number Systems
6. a binary number system is used in the digital computers.
In this number system, it carries only two digits, either 0
or 1.
There are two types of electronic pulses present in a
binary number system.
The first one is the absence of an electronic pulse
representing '0‘
The second one is the presence of electronic pulse
representing '1'.
Each digit is known as a bit.
The location of a digit in a binary number represents a
specific power of the base (2) of the number system.
Number Systems -Binary
7. • It holds only two values, i.e., either 0 or 1.
• It is also known as the base 2 number system.
• The position of a digit represents the 0 power of the
base(2). Example: 20
• The position of the last digit represents the x power
of the base(2). Example: 2x, where x represents the
last position, i.e., 1
• Each successive digit represents a power of 2.
Examples:
(10100)2, (11011)2, (11001)2, (000101)2,
(011010)2.
Number Systems -Characteristics
8. Each successive digit represents a power of 2.
For example,
1) 10011
= (1 X 24) + (0 X 23) + (0 X 22) + (1 X 21) + (1 X 20),
= 16 + 0 + 0 + 2 + 1
= 19
2) 1001
= (1 X 23) + (0 X 22) + (0 X 21) + (1 X 20),
= 1x 8 + 0x 4 + 0 x2 + 1 x 1
= 8 + 0+ 0+ 1
= 9
Number Systems -Binary
9. The decimal number system contains ten digits from 0 to
9(base 10).
The successive place value or position, left to the
decimal point holds units, tens, hundreds, thousands,
and so on
The position in the decimal number system specifies the
power of the base (10).
2541 consist of the digit
1 in the unit position,
4 in the tens position,
5 in the hundreds position,
and 2 in the thousand positions
Number Systems - Decimal
11. The octal number system has base 8
it has only eight digits from 0 to 7
There are only eight possible digit values to represent a
number.
With the help of only three bits, an octal number is
represented.
Each set of bits has a distinct value between 0 and 7.
Number Systems - Octal
12. Characteristics:
• An octal number system carries eight digits
starting from 0, 1, 2, 3, 4, 5, 6, and 7.
• It is also known as the base 8 number system.
• The position of a digit represents the 0 power of
the base(8). Example: 80
• The position of the last digit represents the x
power of the base(8). Example: 8x, where x
represents the last position, i.e., 1
• any number with base 8 is an octal number like
248, 1098, 558, etc.
Number Systems - Octal
13. Octal Digital Value Binary Equivalent
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111
Number Systems - Octal
14. Convert (100010)2 to octal number
100010
100→4
and 010→2
Therefore,(100010)2 = 428
decimal number to octal
19
19/8 = 2, Remainder = 3
2/8 = 0, Remainder = 2
Therefore, 1910 = 238
For octal number 138 to binary
1 → 001
3 → 011
138 = 0010112
Number Systems - Octal
15. Binary number 1111 equivalent to in octal number system
001111 → 001 111 → 17
(1111)2 → (17)8
Convert (100010)2 to octal number.
100→4
and 010→2
(100010)2 = 42
Octal to Decimal Number
1) 2158
2158 = 2 × 82 + 1 × 81 + 5 × 80
= 2 × 64+ 1 × 8 + 5 × 1 = 128 + 8 + 5
= 141
2) 1258 = 1× 82 + 2 × 81 + 5 × 80
= 1 × 64 + 2 × 8 + 5 × 1 = 64+16+5
= 85
Number Systems -Octal
16. Number Representation techniques
base is 16
there are only 16 symbols or possible digit values, there
are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.
Where A, B, C, D, E and F are single bit representations
of decimal value 10, 11, 12, 13, 14 and 15 respectively.
It requires only 4 bits to represent value of any digit.
Applications Hexadecimal Number System is
commonly used in Computer programming and
Microprocessors.
Hexadecimal Number System is commonly used in
Computer programming and Microprocessors.
Number Systems - Hexadecimal
17. The equivalent binary number of Hexadecimal number
are as given below.
Number Systems - Hexadecimal
Hex digit 8 9 A = 10 B = 11 C = 12 D = 13 E = 14 F = 15
Binary 1000 1001 1010 1011 1100 1101 1110 1111
Hex digit 1 0 2 3 4 5 6 7
Binary 0000 0001 0010 0011 0100 0101 0110 0111
18. The decimal value of any hexadecimal number can be determined using sum of
product of each digit with its positional value.
1) Hexa Decimal to Decimal
(200)16
= 2x162+ 0x161+ 0x160
= 2*256 + 0+ 0
=(512)10
2) Hexa Decimal number- (15)16
= 1x161+5x160
16 + 5 =(21)10
3) (A0)16
= A x 161 + 0 x 10
= 10 x 16 + 0x 1
=160
Number Systems - Hexadecimal
19. 1) 1128
Start by dividing the number by 16, that is
(1128/16) = Result = 70 Remainder =8
(70/16) = Result = 4 Remainder = 6
4 / 16 = Result = 0 Remainder = 4
= (468)16
2) 256
Start by dividing the number by 16, that is
256 / 16 = Result = 16 Remainder =0
16 / 16 = Result = 1 Remainder =0
1 / 16 = Result = 0 Remainder =1
= (100)16
CONVERTING DECIMAL TO HEXADECIMAL
20. 1) 188
Start by dividing the number by 16, that is
(188 / 16) = Result = 11 Remainder = 12 (C)
11 / 16 = Result = 0 Remainder = 11(B)
= (BC)16
2) 590
Start by dividing the number by 16, that is
590 / 16= Result = 36 Remainder = 14(E)
36 / 16 = Result = 2 Remainder =4
2 / 16 = Result = 0 Remainder =2
= (24E)16
CONVERTING DECIMAL TO HEXADECIMAL
21. (F8)16
F = 1111
8 = 1000
= (11111000)2
2) (1A) 16
1 = 0001
A = 1010
= (00011010)2
Convert Hexadecimal number to Binary
22. Hexadecimal to Octal Number System Conversion
Hexa
decim
al
0 1 2 3 4 5 6 7 8 9 A B C D E F
Octal 0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17
23. we have to first convert octal number to decimal and
then decimal to hexadecimal.
Convert (121)8 into hexadecimal.
Solution: First convert 121 into decimal number.
⇒ 1 × 82 + 2 × 81 + 1 × 80
⇒ 1 × 64 + 2 × 8 + 1 × 1
⇒ 64 + 16 + 1
⇒ 81 => (121)8 = 8110
81/16 = Result = 5 Remainder = 1
5/16 = Result = 0 Remainder = 5
= (51)16
Octal to Hexadecimal Number System Conversion
26. 2) Convert 1310 to binary:
1310 = 11012
Convert Decimal number to Binary
Division
by 2
Quotient(Result) Remainder Bit #
13/2 6 1 0
6/2 3 0 1
3/2 1 1 2
1/2 0 1 3
27. 3)
3.1
125 into octal number.
First convert it into octal or hexadecimal number
(125)10
= 125/8 Result : 15 Reminder : 5
=15/8 Result: 1 Reminder :7
= 1/8 Result : 0 Reminder :1
= (175)8
Then convert it into binary number by converting each digit.
(001 111 101)2
3.2
= 125/16 Result : 7 Reminder : 13 – (D)
[13 equivalent hexa value is D)
= 7/16 Result : 0 Reminder : 7
= 7D
= 0111 1101
Convert Decimal number to Binary