Tải bản đầy đủ (.pdf) (27 trang)

Lecture Digital logic design - Lecture 17: Problems (Mano)

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (774.75 KB, 27 trang )

DLD
Lecture 17

Problems (Mano)

1


Thr
ee-•
stat A multiplexer can be constructed with three-state gates
e • Output state: 0, 1, and high-impedance (open ckts)
gat• If the select input (E) is 0, the three-state gate has no
es output

Opposite true here,

No output if E is 1

2


Three-State Buffers
° 3-State buffer makes use of the output of two or more
gates or other logic devices can be connected to each
other.
° Enable Signal B = 1 the output C = A
° Enable Signal B = 0 the output C = Open

3



Three-State Buffers
° Four kinds of three-state buffers
° Can not operate: Output = Z
Unclear output: Output = X

(a)

(b)

(c)

(d)
4


Thr
eestat•
e •
gat•
es

A multiplexer can be constructed with three-state gates
Output state: 0, 1, and high-impedance (open ckts)
If the Enable input is low, the three-state gate has no output

5


Problem

Design a 4-bit combinational circuit 2’s complementer (The output
generates the 2’s complement of input binary number). Show that
the circuit can be constructed using XOR gates. Can you predict
what the output functions are for a 5-bit 2’s complementer?

6


Problem
Design a 4-bit combinational circuit 2’s complementer (The output
generates the 2’s complement of input binary number). Show that
the circuit can be constructed using XOR gates. Can you predict
what the output functions are for a 5-bit 2’s complementer?

7


Problem
Design a 4-bit combinational circuit 2’s complementer (The output
generates the 2’s complement of input binary number). Show that
the circuit can be constructed using XOR gates. Can you predict
what the output functions are for a 5-bit 2’s complementer?

8


Problem
Design a 4-bit combinational circuit 2’s complementer (The output
generates the 2’s complement of input binary number). Show that
the circuit can be constructed using XOR gates. Can you predict

what the output functions are for a 5-bit 2’s complementer?

9


Problem
Design a 4-bit combinational circuit 2’s complementer (The output
generates the 2’s complement of input binary number). Show that
the circuit can be constructed using XOR gates. Can you predict
what the output functions are for a 5-bit 2’s complementer?

Try it yourself

10


Problem
Design a four-bit combinational circuit incrementer
(a circuit that adds 1 to a four-bit binary number.
(b) Design a four-bit combinational circuit decrementer (a
circuit that subtracts 1 from a four bit binary number)

11


Half
Add
° er
Add two binary numbers
• A0 , B0 -> single bit inputs

• S0 -> single bit sum
• C1 -> carry out

A 0 
B 0 

A 0  B 0  S 0  C 1 

0
0
1
1

0
1
0
1

0
1
1
0

0
0
0
1

S 0 


C 1 

Dec Binary

1
+1
2

1
+1
10

12


Problem
Design a four-bit combinational circuit incrementer
(a circuit that adds 1 to a four-bit binary number.
(b) Design a four-bit combinational circuit decrementer
(a circuit that subtracts 1 from a four bit binary number)

To decrement the 4-bit number, add -1 to the number. In 2's
complement format ( add Fh ) to the number. An attempt to
decrement 0 will assert the borrow bit.
13


Full
Add
° Full

er adder made of several half adders
Si = Ci ⊕ (Ai ⊕ Bi)
Ci+1 = AiBi + Ci(Ai ⊕ Bi)
C i 
A i 

S i 

B  i 

Half­adder

Half­adder

C  i+1 

14


4-bit Subtractor: E = 1

A 3 

B  3 

A 2 

B 2 

A 1 


B 1 

A 0 

B  0 


Full Adder


Full Adder



C 4 

SD 3 

SD 2 

Full Adder
C 2 

Full Adder
C 1 

SD 1 

+1


SD 0 

Add A to B’ (one’s complement) plus 1
That is, add A to two’s complement of B
D = A ­ B
15


Problem (Mano)
Design a combinational circuit that compares two four-bit
numbers to check if they are equal. The circuit output is equal
to 1 if the two numbers are equal and 0 otherwise.

16


Problem
Draw the logic diagram of a two-to-four-line decoder using a
NOR gates only including and enable input.

17


Problem (Mano)
Using a decoder and external gates, design the
combinational circuit defined by the following three
Boolean functions.

18



Problem
Using a decoder and external gates, design the
combinational circuit defined by the following three
Boolean functions.

19


Problem
Using a decoder and external gates, design the
combinational circuit defined by the following three
Boolean functions.

20


Problem
Using a decoder and external gates, design the
combinational circuit defined by the following three
Boolean functions.

21


Problem
Construct a 16 x1 multiplexer
with two 8x1 and one 2 x 1
multiplexers. (Use Block

Diagrams)

22


Problem
Implement the following Boolean function with a 4 x 1
multiplexer and the external gates

23


Problem
Implement the following Boolean function with a 4 x 1
multiplexer and the external gates

24


Problem
An 8 x 1 multiplexer has inputs A, B and C connected to the
selection inputs S2, S1, S0 respectively. The data inputs I0
through I7 are as follows:

25


×