Docsity

Logic Design Exercises, Study Guides, Projects, Research of Logic

Toggle sidebar
bg1
Exercises 3
Logic Design
Computer Organization and Components / Datorteknik och komponenter (IS1500), 9 hp
Computer Hardware Engineering / Datorteknik, grundkurs (IS1200), 7.5 hp
KTH Royal Institute of Technology
Friday 2nd October, 2015
Gates and Boolean Algebra
1. Draw the symbols and write out the truth tables for the following logic gates:
AND, OR, NOT, NAND, NOR, XOR
2. Consider the circuit below:
A!"
B!"
Y"
(a) Create the truth table for the circuit.
(b) Write down the corresponding boolean algebra expression.
(c) Simplify the circuit. Explain which boolean algebra theorems that are used.
3. The following circuit includes a tristate buffer:
A!"
B!"
Y"
C
B
A
B
Y2"
Y1"
(a) Create the truth table for the circuit
(b) Explain what the tristate buffer is doing and what the output from the buffer means.
1
pf3
pf4

Partial preview of the text

Download Logic Design Exercises and more Study Guides, Projects, Research Logic in PDF only on Docsity!

Exercises 3

Logic Design

Computer Organization and Components / Datorteknik och komponenter (IS1500), 9 hp Computer Hardware Engineering / Datorteknik, grundkurs (IS1200), 7.5 hp

KTH Royal Institute of Technology Friday 2nd^ October, 2015

Gates and Boolean Algebra

  1. Draw the symbols and write out the truth tables for the following logic gates: AND, OR, NOT, NAND, NOR, XOR
  2. Consider the circuit below:

A! "

B! "

Y"

(a) Create the truth table for the circuit. (b) Write down the corresponding boolean algebra expression. (c) Simplify the circuit. Explain which boolean algebra theorems that are used.

  1. The following circuit includes a tristate buffer:

A! "

B! "

Y"

C

B

A

B

Y2"

Y1"

(a) Create the truth table for the circuit (b) Explain what the tristate buffer is doing and what the output from the buffer means.

  1. Consider the following truth table.

Y"

S!

A "

Y!

B "

(a) Create the corresponding boolean expression in sum-of-products form. (b) Simplify the expression using the boolean theorems presented at Lecture 7. Clearly state which theorems that you are using. (c) Draw the final circuit in a simple form, that is, reuse as many gates as possible.

Multiplexers, Decoders, and Adders

  1. The following tasks concerns a 2:1 multiplexer.

(a) Draw the symbol for the multiplexer. (b) Create the truth table in a short form, where the โ€œdonโ€™t careโ€ symbol โ€œ?โ€ is used as often as possible. (c) Draw a circuit that gives the same meaning as the above 2:1 multiplexer. The circuit should consist of exactly 2 AND-gates, 1 OR-gate, and 1 NOT-gate. (d) How does this circuit compare to the solution of exercise 4c.

  1. Decoders.

(a) Draw a figure for a 3:8 decoder. (b) Write out the truth table for a 2:4 decoder. (c) Explain the meaning of the numbers that determine the size of the two encoders 3: and 2:4. (d) Create a circuit consisting of AND-gates, OR-gates, and NOT-gates that defines a 2:4 decoder.

  1. Assume that you want to create a 4:1 multiplex where the data input/output ports have 8-bit bus width. Draw the multiplexer. Note that you must clearly show the bus width of the wires.
  2. Construct a circuit that takes a 6-bit input A and outputs a 6-bit signal Y , where the output is A multiplied by value 3. You should use 1-bit full adders and basic gates.
  1. Consider the following circuit where the register is triggered on the rising clock edge.

CLK$

A$

B$

Cin$

8" 8"

8"

CLK$

R1" R2"

C$

Y1$ Y2$

(a) Assume that register R1 holds value 0x3, register R2 value 0x5, A = 3, B = 0, and C = 0. Show the signal values for signals Y 1 and Y 2 for the first 3 clock cycles. (b) Assume that register R1 holds value 0x10, register R2 value 0x8, A = 2, B = 255, and C = 1. Show the signal values for signals Y 1 and Y 2 for the first 3 clock cycles.

  1. Consider the following register file. Assume that N = 4 and M = 16.

CLK$

R2" (^) Y 2$

CLK$

A1$ RD1$

A2$

N N A3$ N WD3$ M

M RD2$ M

WE3$

(a) What is the difference between a register file and a register? (b) How many ports has the above the register file got? How many input ports and how many output ports? (c) What is the total number of bits of data that this register file can store? (d) Assume the following mapping from addresses to memory values {0x3 7 โ†’ 0x3f, 0xa 7 โ†’ 0x22, 0x9 7 โ†’ 0xe7} is a known state of the register file. Assume further that A 1 = 0xa, A 2 = 0x9, A 3 = 0x3, WD 3 = 0x53, and WE 3 = 0x1. What are then the values for RD 1 and RD 2 and what is the new known state of the register file?