Professional Documents
Culture Documents
a3a2a1a0.a1a2
a3 r 3 a2 r 2 a1 r1 a0 r 0 a1 r 1 a2 r 2
• 1011.10102
23*1+ 22*0+21*1+20*1. 2-1*1 +2-2*0 +2-3*1 +2-4*0
8 + 0 + 2 + 1.1/2 + 0 + 1/8 + 0
=11.625 Answer
• 11112
23*1 +22*1 +21*1 +20*1
8*1+ 4*1+ 2*1+ 1*1
8+4+2+1=15 Answer
Binary Numbers
• Each binary digit (called bit) is either 1 or 0
• Bits have no inherent meaning, can represent
– Unsigned and signed integers
– Characters
Most Least
– Floating-point numbers Significant Bit Significant Bit
– Images, sound, etc. 7 6 5 4 3 2 1 0
1 0 0 1 1 1 0 1
• Bit Numbering 27 26 25 24 23 22 21 20
• (10000101)2 =27*1+22*1+2 0 *1
=128+4+1
= 133 Answer
Decimal to binary
conversion
• 12210= (?)2
122
-64 =26
58
- 32 =25
26
16=204
10
- 8= 23
2
- 2= 21
0
(01111010) Answer
Successive division
• Another method to convert decimal into binary is called
successive division.
(1111010) Answer
Successive division
15210= (?)2
Home work: take
2 152 Remainder 0 10 different values in
2 76 Remainder 0 binary and decimal
2 38 Remainder 0 and perform these
2 19 Remainder 1 conversions
2 9 Remainder 1
2 4 Remainder 0
2 2 Remainder 0
(0011000)Answer
Binary sequence
• How to write binary 00
22=4 23=8
000
24=16
0000
sequence? 01
10
001
010
0001
0010
11 011 001
• Formula of counting 00
01
100
101
0100
0101
range 2n=M. 10
11
110
111
0110
0111
00 000 1000
8 404 Remainder 4
8 50 Remainder 2
8 6 Remainder 6
(624)8Answer
Hexadecimal numbering
s–yTshteehmexadecimal numbering
Decimal Hexadecimal
system is like the octal system, is O O
1 1
the method of grouping bit to 2
3
2
3
simplify entering and reading the 4
5
4
5
6 6
instructions or data present in 7 7
8 8
digital computer system. 9
10
9
A
11 B
– It uses 4 bit groupings. 12
13
C
D
• Hexadecimal to decimal
i) 2A616 = (?)10
2*162+10*161+6*160
512+160+6
67810Answer
1BC216= (?)10
ii) 1*163+11*162+12*161 2*160
+
4096+2816+192+2
710610Answer
Convert decimal to
hexadecimal
• 15110 to hexadecimal
1*162+5*161+1*160
256+80+1
337HAnswer.
16 214 Remainder 6
16 13 Remainder 13
(D6)16Answer
Binary coded decimal
system:
• A group of binary 0’s and 1’s can be thought of as a code of
representation the decimal number when a decimal number
is represented by its equivalent binary number w call it
straight binary coding.
999
1001
1001
1001
100110011001 BCD
Decimal Binary Octal Hexadecimal BCD
0 0000 0 0 0000
1 0001 1 1 0001
2 0010 2 2 0010
3 0011 3 3 0011
4 0100 4 4 0100
5 0101 5 5 0101
6 0110 6 6 0110
7 0111 7 7 0111
8 1000 10 8 1000
9 1001 11 9 1001
10 1010 12 A 1010
11 1011 13 B 1011
12 1100 14 C 1100
13 1101 15 D 1101
14 1110 16 E 1110
15 1111 17 F 1111