






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Binary Number SystemIn ECE 110 we will only consider positive numbers!Decimal numbers
‘in base 10’)
Example 1: (527)
10
Binary numbers
‘in base 2’)
Example 2: (101)
10
Example 3: (527)
2
Know the powers of 2!
M.-C. BRUNET
ECE 110
UIUC
A binary digit is called a ‘bit’.The binary coding of (527)
has ______ bits. 10
Example 4:
Example 5
: 6 bits storage
10
how many bits
are needed for the binary coding?
M.-C. BRUNET
ECE 110
UIUC
Decimal
Binary
Hexa
Decimal
Binary
Hexa
0
8
code large amount of bits16 different (hexa) digits 0 1 2 3
8 9 1011
4 5 6 7
12131415
7
15
Example 6:
16
10
M.-C. BRUNET
ECE 110
UIUC
Example 7
Information is stored on computers with a fixednumber of bits. Show the contents of an 8-bitregister used to store (43)
10
In Hexa?
M.-C. BRUNET
ECE 110
UIUC
n-
ai^
is a binary digit (or ‘BIT’) = 0 or 1 The
decimal
value for A is: (
The
decimal
value for A is: (
Parallel Adder: adding two n-bit numbers
n-
n-
n-
an-
b n-
...... a
1
b^1
a^0
b^0
carry
Parallel Adder M.-C. BRUNET
ECE 110
UIUC
S^ n-
Example 9: Add A = (1101) and B = (0111)
a^
b^3
a^
b^2
a^
b^
a^0
b^0
carry
4-bit Parallel Adder
M.-C. BRUNET
ECE 110
UIUC
an-
b n-
...... a
1
b^1
a^
b^0
Parallel Adder: Implementation
S^ n-
carry
Parallel Adder
Using Gates
Adding two n-bit numbers
Using Blocks carry
a^ n-
b n-
......... a
1
b^1
a^
b^0
M.-C. BRUNET
ECE 110
UIUC
carry
S^ n-
l^
Full Adder: Adding 3 bits together
Example 10:
ca
c
arrysum
arry sum
Example 11: Adding A = (110)
and B = (011) 2
2
Use a 3-bit parallel adder
b^
b^
b
a^
b^2
a^
b^1
a^0
b^0
M.-C. BRUNET
ECE 110
UIUC
y^
g
a fixed number of bits.There is overflow if the result of the additioncannot be stored back in the destination register. E^
l^
13 4 bi
i
Example 13: 4-bit registers.Numbers A and B are from example 9.
Parallel Adder
(DestinationRegister)
M.-C. BRUNET
ECE 110
UIUC
LEDs, LCDs. Displays letters, numbers, symbols.
f^
b
a
a b c d^
g^
One segment is ON
e
d
c
d e f g
when thecorrespondinginput is equal to:
d
Example 14:
M.-C. BRUNET
ECE 110
UIUC
Example 15: Analyze a Combinational Circuit
f e^
b c a
a b c d e
g e
d
c
f g
Circuit abovedisplays something
a^
b^
c^
d^
e^
f^
g^
Displays
M.-C. BRUNET
ECE 110
UIUC
Decimal Number Display
Example 16: Design a Combinational Circuit, anumber display to display all decimal numbers
abc de fg
g 7 outputs
Inputshow many?
a^
b^
c^
d^
e^
f^
g^
Displays
10
Blank
M.-C. BRUNET
ECE 110
UIUC
..
Design the combinational circuit such thatA B
?
abcde
g when AB = 00 (resp 01, 10, 11) it displays2 (resp.4, 6, 8) SOLUTIONS:
?
efg
a = d = e = A + B
b = A + B
c = f = A + B
g = 1
M.-C. BRUNET
ECE 110
UIUC
Note: Half Adders are no longer covered in ECE 110Prove that the implementation below iscorrect (correctly producing the outputs fora Full Adder). Labels were added to help!
p
carHAry^ sum C
S1carHAry^ sumS C
Solution: let’s look at all the wires in the circuit; (C1, S1) = HA (a,b);(C2, S2) = HA (S1, c); check if indeed S2 is the sum of (a,b,c) andThe OR of (C1, C2) the corresponding carry. Complete solution belowHA(a,b)
HA(S1,c)
FA(a,b,c)
a b C1 S1 c C2 S2 OR(C1, C2) Carry Sum0 0
0
0
0
0
0
0
0
0
0 0
0
0
1
0
1
0
0
1
0 1
0
1
0
0
1
0
0
1
0 1
0
1
1
1
0
1
1
0
1 0
0
1
0
0
1
0
0
1
1 0
0
1
1
1
0
1
1
0
M.-C. BRUNET
ECE 110
UIUC
1 0
0
1
1
1
0
1
1
0
1 1
1
0
0
0
0
1
1
0
1 1
1
0
1
0
1
1
1
1
equal!