Unit 1 Basics of Computer Part 2b NumberSystem
Unit 1 Basics of Computer Part 2b NumberSystem
Decimal to Octal
(i) (9)10 = ( ?)8
8 9
8 1 1
0 1
STOP
(9)10 = (11)8
(23)10 = (27)8
.35*8
.35*8
2.80 *8 2
.40 *8 6
.20*8 3
.60 1
(.2631)8
Combining integer value with floating point value
(89.35)10 = (131.2631)8
2. Decimal to Hexadecimal
4 9
4 2 1
0 2
STOP
12 9
0 9
STOP
12 23
12 1 11 = B
0 1
STOP
(23)10= (113)4 = (1B)12
.25*4
.00 1
STOP
(.1)4
.25*12
.00 3
STOP
(.3)12
1*2^7+ 0*2^6+0*2^5+1*2^4+0*2^3+0*2^2+1*2^1+0*2^0
=>1*128+0*64+0*32+1*16+0*8+0*4+1*2+0*1
=>128+0+0+16+0+0+2+0=146
Integer value in decimal is 146
.0101
0*2^-1+ 1*2^-2+ 0*2^-3 + 1*2^-4
=>0*1/2+1*1/4+0*1/8+1*1/16
=>0+1/4+0+1/16= 5/16=0.3125
Floating pointing number
Combine integer value and floating point value
(10010010.0101)2 = (146. 3125)10
2. Octal to Decimal
(iii) (765)8= (?)10
=>7 * 8^2+ 6*8^1+5* 8^0
=>7*64+ 6*8+5*1
=> 448 + 48+5 = (501)10
(iv) (123.05)8 = (?)10
(83. 078125)10
3. Hexadecimal to Decimal
Binary to Octal
Binary to Hexadecimal
Binary = 0 and 1
Octal = 2^3
Hexadecimal = 2^4
(11100100101010.1010)2= (?)8
(34452)8
.1010
101 0 or 000
5 0
(34452.50)
Binary Octal
(110101)2= (?)8
110 = 6
101 = 5
(65)8
======
(110101) Decimal
32+16+0+4+0+1= (53)10
53 Octal
8 53
8 6 5
0 6
(65)8
(.1010)2 = (?)10
1/2 + 0 + 1/8 + 0
= 5/8= .625
(.625) Octal
.625*8= 5.000
(.5)8
Binary to Hexadecimal
2^1 2^4
Bianary Decimal Hexadecimal
(10101100)2 decimal
128+0+32+0+8+4+0+0 = 172
172 in decimal hexadecimal
16 172
16 10 12= C
0 10=A
(AC)16
16 162
16 10 2
0 10= A
(A2)16
(10101100)2
1010 1100
10=A 12=C
(AC)16
(1110101100)2
11 1010 1100
3 A C
(111101011.1010101101)2 = (?)16
1 or 0001 1110 1011
1 14 =E 11=B
(1110101100.1010101101)2= (?)10
512+256+128+0+32+0+8+4+0+0 = 940
1010101101
1/2 + 0 + 1/8 + 0 + 1/32 + 0 + 1/128 + 1/256 + 0 + 1/1024
0.6689453125
(940.6689453125)10 (?)16
16 940
16 58 12=C
16 3 10=A
0 3
STOP
(.6689453125)10 (?)16
.6689453125 * 16
10.703125 * 16 10 =A
11.25 * 16 11 = B
4.0000 4
STOP
Octal
Decimal Binary
Hexadecimal
(345.2)8(?)2
3 4 5
011 100 101
.2
010
(011100101)2
(1A2B.2)16(?)2
1 A 2 B
0001 1010 0010 1011
(0001101000101011)2
Or
(1101000101011)2
.2
0010