Professional Documents
Culture Documents
Octal
Hexadecimal
Decimal Binary
Octal
Hexadecimal
0
1
0
1
0
1
0
1
8
9
1000
1001
10
11
8
9
2
3
4
5
6
7
10
11
100
101
110
111
2
3
4
5
6
7
2
3
4
5
6
7
10
11
12
13
14
15
1010
1011
1100
1101
1110
1111
12
13
14
15
16
17
A
B
C
D
E
F
1
Number Systems
System
Used by
humans?
Used in
computers?
Base
Symbols
Decimal
10
0, 1, 9
Yes
No
Binary
0, 1
No
Yes
Octal
0, 1, 7
No
No
Hexadecimal
16
0, 1, 9,
A, B, F
No
No
2
1/12/2015 2:33 AM
3
1/12/2015 2:33 AM
4
positions:
1 0 0 1 1 0 1
26 25 24 23 22 21 20
1/12/2015 2:33 AM
6
Binary Decimal
1010
10
1011
11
1100
12
1101
13
1110
14
1111
15
Hexadecimal
A
B
C
D
E
F
3 C 8 B 0 5 1
166 165 164 163 162 161 160
7
The possibilities:
Decimal
Octal
Binary
Hexadecimal
1/12/2015 2:33 AM
8
1/12/2015 2:33 AM
9
12510 =>
5 x 100=
5
2 x 101= 20
1 x 102= 100
125
Base
1/12/2015 2:33 AM
10
Technique
Multiply each bit by 2n, where n is the weight of the
bit
The weight is the position of the bit, starting from 0 on
the right
Add the results
1/12/2015 2:33 AM
11
Bit 0
1010112 =>
1
1
0
1
0
1
x
x
x
x
x
x
20
21
22
23
24
25
=
=
=
=
=
=
1
2
0
8
0
32
4310
1/12/2015 2:33 AM
12
(100010)2
=020+121+022+023+024+125
=0+2+0+0+0+32
=(34)10
(0.1011)2
=12-1+02-2+12-3+12-4
=0.5+0+0.125+0.0625
=(0.6875)10
(10101.011)2
Integer part: (10101)2=120+021+122+023+124
=1+0+4+0+16 = (21)10
Technique
Multiply each bit by 8n, where n is the weight of the
bit
The weight is the position of the bit, starting from 0 on
the right
Add the results
1/12/2015 2:33 AM
14
7248 =>
4 x 80 =
2 x 81 =
16
7 x 82 =
448
46810
15
(2376)8 = (?)10
= 283+382+781+680
= 1024+192+56+6
= (1278)10
(1234.567)8
=183+282+381+480 +58-1+68-2+78-
=512+128+24+4+0.625+0.09375+0.01367
= (668.7324219)10
16
Technique
Multiply each bit by 16n, where n is the weight of the
bit
The weight is the position of the bit, starting from 0 on
the right
Add the results
1/12/2015 2:33 AM
17
ABC16 =>
C x 160 = 12 x
1 =
12
B x 161 = 11 x
16 =
176
18
(269)16
=2162+6161+9160
= 2256+96+9
= (617)10
(2B8D.E2)16
=2163+11162+8161+13160 +1416-1+216-2
=8192+2816+128+13+0.875+0.0078125
= (11149.88281)10
19
Technique
Divide by two, keep track of the remainder
1/12/2015 2:33 AM
20
12510 = ?2
2 125
2 62
2 31
2 15
7
2
3
2
1
2
0
1
0
1
1
1
1
1
12510 = 11111012
21
(734)10=(X)2
Take the numbers from
bottom to top,
(734)10 = ( 1011011110)2
22
(0.705)10
0.7052=1.410 ---1
0.4102=0.820 ---0
0.822= 1.64------1
0.642= 1.28------1
0.282= 0.56------0
0.562=1.12-------1
0.122=0.24-------0
0.242=0.48-------0
0.482=0.96-------0
0.962=1.92-------1
(41.915)10 =(?)2
24
Technique
Convert each octal digit to a 3-bit equivalent binary
representation
1/12/2015 2:33 AM
25
7058 = ?2
7
7058 = 1110001012
1/12/2015 2:33 AM
26
(632)8
110
011
010
So, (632)8=(110011010)2
27
(7423.245)8
(7423.245)8= (111100010011.010100101)2
28
Technique
Convert each hexadecimal digit to a 4-bit equivalent
binary representation
1/12/2015 2:33 AM
29
10AF16 = ?2
1
10AF16 = 00010000101011112
1/12/2015 2:33 AM
30
Technique
Divide by 8
1/12/2015 2:33 AM
31
123410 = ?8
8
8
8
8
1234
154
19
2
0
2
2
3
2
123410 = 23228
1/12/2015 2:33 AM
32
(2003)10=(X)8
33
(0.12)10 = (X)8
0.128=0.96---0
0.968=7.68---7
0.688=5.44---5
0.448=3.52---3
0.528=4.16---4
(0.12)10=(0.07534)8
34
Technique
Divide by 16
1/12/2015 2:33 AM
35
123410 = ?16
16
16
16
1234
77
4
0
2
13 = D
4
123410 = 4D216
36
37
10110101112 = ?8
1 011 010 111
10110101112 = 13278
38
(011101.110)2 = (?)8
011
101
110
39
Technique
Group bits in fours, starting on right
40
10101110112 = ?16
10 1011 1011
10101110112 = 2BB16
41
42
(347.28)16 = (?)2
3
0010 1000
(347.28)16= (001101000111.00101000)2
43
(8BE6.7A)16 =(?)2
8
. 7
group of four.
45
(46) 8 = (?)16
Octal equivalent
Hexadecimal
equivalent
100
110
0010 0110
2
(46) 8 =(26)16
46
(764.352) 8 = (?)16
Octal equivalent
4 . 3
4 . 7
(764.352) 8 = (1F4.750)16
47
10768 = ?16
1
001
000
111
110
10768 = 23E16
48
Technique
Use binary as an intermediary
1/12/2015 2:33 AM
49
1F0C16 = ?8
1
0001
1111
0000
4
1100
1F0C16 = 174148
1/12/2015 2:33 AM
50
51
Decimal number
BCD number
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
10
0001 0000
11
0001 0001
12
0001 0010
13
0001 0011
14
0001 0100
15
0001 0101
52
(743.3)10=(0111010000110110) BCD
53
(11011100001001)BCD
0011 0111 0000 1001
(11011100001001) BCD=(3709)10
54
+0
+1
+0
+1
B
0
1
0
1
A+B
0
1
1
10
two
1/12/2015 2:33 AM
56
(1010)2+(0111)2
1010 =10
+0111 =7
10001 =17
(1010)2+(0111)2=(10001)2
57
(101)2+(011)2
101=5
+011=3
1000=8
(101)2+(011)2=(1000)2
58
59
10
10
S=6
C=1
1) (173) 8+(265) 8
2) (222) 8+(333) 8
3) (25.36) 8+(37.11) 8
4) (12) 8+(20) 8
61
62
16
23
13
C=1
S=7
C=0
S=D
C=0
S=8
1) (ABC) 16+(BCD) 16
2) (9349) 16+(AACE) 16
3) (AA.BB) 16+(BB.CC) 16
4) (A0FC) 16+(B75F) 16
64
Example:
1/12/2015 2:33 AM
Binary
1s
number
complement
10101
01010
11100
00011
1111
0000
66
67
1101minuend
1000 subtrahend
1s complement of subtrahend = 0111
Add minuend
subtrahend
and
1s complement of
68
End carry
Add to LSB
0
+1
1
1)
(1111)2 - ( 0101)2
1111minuend
0101 subtrahend
1s complement of subtrahend = 1010
Add minuend and 1s complement of
subtrahend,
70
+1
0
71
(6)10-(14)10
6=0110minuend
14=1110 subtrahend
1s complement of subtrahend = 0001
Add minuend and 1s complement of
subtrahend,
72
No End carry
(1101) 2-(11001) 2
(1111) 2-(1011) 2
(110011) 2-(100101) 2
(10001) 2from(10011) 2
74
75
(1111)2-(1100)2
1111minuend; 1100 subtrahend
2s complement of subtrahend = 0100
+
1
Neglect end carry
0 (1111)2-(1100)2=
(0011)2
77
(15)10-(31)10
(1111)2-(11111)2
78
No end carry
(1111)2-(11111)2= -(10000)2
79
(1101) 2-(11001) 2
125 and -68
80
82
A+B
B+A
0 0
0 1
1 0
83
A.B
B.A
84
Commutative Laws
A+B
B
A
B+A
AB
B
A
BA
86
A+(B+C)
87
88
A.B
B.C (A.B)C
A(B.C)
89
Associative Laws
A+(B+C)
B
C
B+C
A+B
B
C
(A+B)+C
A(BC)
BC
A
B
C
AB
(AB)C
B+C
A(B+C)
A.B
A.C
A.B+A.C
91
Property 2: A + A B = A+B
A
AB
A B+A
A+B
92
Distributive Laws
B+C
A
C
X=A(B+C)
AB
AC
X=AB+AC
7. A A A
8. A A 0
9. A A
10. A AB A
11. A A B A B
12.( A B )( A C ) A BC
___________________________________________________________
A, B, and C can represent a single variable or a combination of variables.
Examples:
X +0=X X .1=X
X+Y=Y+X X.Y=Y.X
X+1=0 X.0=1
96
DeMorgans Theorems
NAND
Negative-OR
X Y X Y
NOR
Negative-AND
X Y X Y
A.B
98
A
A
99
A+B
100
X Y Z
X Y Z
X Y Z
W X Y Z
Examples:
(a) a + ab = a(1+b)=a
(b) a(a + b) = a.a +ab=a+ab=a(1+b)=a.
= a + a.1 + 0
= a +a=a
More Examples
Show that;
(a) ab + ab'c = ab + ac
(b) (a + b)(a + b' + c) = a + bc
(a) ab + ab'c = a(b + b'c)
= a((b+b').(b+c))=a(b+c)=ab+ac
(b) (a + b)(a + b' + c)
= (a.a + a.b' + a.c + ab +b.b' +bc)
=
1.
Z+
YZ
= Z[
+Y]
= Z[1]= Z
2. f = B(A+C)+C
=BA+BC+C
=BA+C(1+B)
=BA+C
105
107
108
Output
Y= A+B
1
110
Output
Y=A.B
112
Truth Table
Input
output
Y=
114
Output
Y = AB
0
115
Output
Y=
A B
116
117
A B
B
A
Input
A
Output
Y = A B
Y = A B = A +
118
119
Truth Table:
Input
Output
Y=
AB
+AB
120
121
NOT operation:
AND operation:
122
A
A+B
A B
OR operation:
NOR operation:
123
NOT operation:
AND operation:
OR operation:
NAND operation:
124
125
126
127
130
Output
Input
A
Sum
Carry
Sum= A
B=A
Carry= A.B
131
132
134
Input
Output
Cin
Sum
Carry
1
135
Cin
Sum= Cin + B +A
+ABCin
= [ Cin +B ]+A[
+BCin]
= [B Cin]+ A[
]
= A B Cin
136
138