Sheet 4
Sheet 4
3) Show how to implement the function f ( w1 , w2 , w3 ) = m (0,2,3,4,5,7 ) using a 3 x 8 binary decoder and
an OR gate. Write the VHDL code
4) Show how to implement the function f ( w1 , w2 , w3 ) = m (1,2,3,5,6) using a 3 x 8 binary decoder and
an OR gate. Write the VHDL code
___ ___ ___ ___
5) Consider the function f = w1 w3 + w2 w3 + w1 w2 . Use the truth table to derive a circuit for f that uses a 2-
to-1 multiplexer
6) Find the truth table, and Boolean expressions for a digital circuit that counts the number of 1’s in a 4-bit
word code . Develop a VHDL behavior and structure model. Simulate the model
7) A two-out-of-five detector. The device receives an input a 5-bit parallel word. The output is a logic 1 for any
code word the has exactly two 1’s in it and a logic 0 otherwise. Find the truth table, logic diagram, and
Develop a behavior VHDL model. Simulate the model
Egyptian Russian University
Faculty of Artificial Intelligence
8) A parallel even-parity detector. The input is a 4-bit word code. The output is logic 1 if the number of 1’s is
even, and 0 if the number of 1’s is odd. Find the truth table, logic diagram, and Develop a behavior and
structural VHDL model. Simulate the model
9) Consider the following truth table. Find the truth table, and Boolean expressions. Develop a structure VHDL
model. Simulate the model
X2 X1 X0 F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
10) For the following circuit. Deduce the Boolean equations. Develop a behavioral and structure VHDL models
.
11) 3 x 8 decoder using two 2 x 4 decoder shown in the following figure. Find the structure VHDL model.
Egyptian Russian University
Faculty of Artificial Intelligence
14) For the following circuit. Deduce the Boolean equation. Develop a behavioral and structure VHDL
models.
F ( A, B , C , D ) = (0,1,3,4,8,9,15)
b) 8 x 1 multiplexer
21) Implement the following Boolean equation:
F = (2,5,8,7,8) using
a) 4 x 1 multiplexer
b) 8 x 1 multiplexer
c) For the following waveforms of the input signals a,b, and c, find the waveforms at w,y, and z
Egyptian Russian University
Faculty of Artificial Intelligence
a) using 4 x 6 decoder
b) using 4 x 1 multiplexer and 8 x 1 multiplexer
37) F1 = (0,1,2,3), and F2 = (3,5,7 ) . Implement F1 and F2 using
a) PLA
b) PAL
c) ROM
38) Using a PLA, implement a system that converts from BCD-to-excess-3-code
39) Using a PLA, implement a system that produce the square of a BCD digit. The output should be in binary
representation
40) The following figure illustrates a simple CPU circuit that processes two 4-bit binary variables A and B (4-
bits). It contains and:
o four 4-bit registers
o two 4x1 multiplexers
o one 2x4 decoder
o ALU
Egyptian Russian University
Faculty of Artificial Intelligence
S8 S7 S6 Operation type
0 0 0 Binary addition
0 0 1 Binary subtraction
0 1 0 Binary multiplication
0 1 1 Binary division
1 0 0 OR
1 0 1 AND
1 1 0 XOR
1 1 1 XNOR
a) Find the type and the operands for the operation corresponding of the controls given in the following table
0 0 1 0 1 0 1 1 1 0
1 1 0 1 0 1 0 0 0 0
b) Find the controls for the following operations listed in following table
d) For the following waveforms for the input signals A, and B, find the waveforms of L, E and G