Docsity

Boolean Algebra - Assembler Programming and Computer Organization - Lecture Slides, Slides of Computer Architecture and Organization

Partial preview of the text

Download Boolean Algebra - Assembler Programming and Computer Organization - Lecture Slides and more Slides Computer Architecture and Organization in PDF only on Docsity!

Chapter 3: Boolean Algebra and Digital Logic

  • Chapter 3: Digital Logic โ€“ 1

CS140 Computer Organization

Chapter 3 Objectives

  • Understand the relationship between Boolean logic and

digital computer circuits.

  • Learn how to design simple logic circuits.
  • Understand how digital circuits work together to form

complex computer systems.

  • Chapter 3: Digital Logic โ€“ 2

3.2 Boolean Algebra

  • Iโ€™m assuming that you have taken or are currently taking Discrete Math. So Iโ€™m not planning on talking about Boolean algebra other than to connect it with circuits.
  • The Slides written by Null & Lobur have been moved to an Appendix at the end of this set. - Chapter 3: Digital Logic โ€“ 4

3.3 Logic Gates

  • Boolean functions are implemented in digital computer circuits called gates.
  • A gate is an electronic device that produces a result based on two or more input values. - In reality, gates consist of one to six transistors, but digital designers think
of them as a single unit.
  • Integrated circuits contain collections of gates suited to a particular
purpose.
  • Chapter 3: Digital Logic โ€“ 5
Vs โ€“ is ground = 0 Volts
Vd โ€“ high voltage โ€“ for all the
things weโ€™re doing, this is
+5V, but there are many
possibilities.
Vg โ€“ gate voltage โ€“ depending
on this value, the electrons
can or can not flow from
high to low voltage.

3.3 Logic Gates

  • The three simplest gates are the AND, OR, and NOT gates.
  • They correspond directly to their respective Boolean
operations, as you can see by their truth tables.
  • And these representations map exactly into the transistors
on the last two slides.
  • Chapter 3: Digital Logic โ€“ 7 74LS Quad 2-input AND

3.3 Logic Gates

  • The output of the XOR operation
is true only when the values of
the inputs differ.
  • Chapter 3: Digital Logic โ€“ 8

Note the special symbol ๏ƒ…

for the XOR operation.

  • Symbols for NAND and NOR, and
truth tables are shown at the right.

74LS Quad 2-input NOR

3.4 Digital Components

  • Combinations of gates implement Boolean functions.
  • The circuit below implements the function:
    • Chapter 3: Digital Logic โ€“ 10
  • This is an example of a combinational logic circuit.
  • Combinational logic circuits produce a specified output

(almost) at the instant when input values are applied.

  • Later weโ€™ll explore circuits where this is not the case.

3.5 Combinational Circuits

  • As we see, the sum can be found using the XOR operation and the carry using the AND operation. - Chapter 3: Digital Logic โ€“ 11
  • Combinational logic circuits give us many useful devices.
  • One of the simplest is the half adder , which finds the sum of two bits.
  • We can gain some insight as to the construction of a half adder by looking at its truth table, shown at the right.

3.5 Combinational Circuits

  • Just as we combined half adders to make a full adder,

full adders can connected in series.

  • The carry bit โ€œripplesโ€ from one adder to the next;

hence, this configuration is called a ripple-carry adder.

  • Chapter 3: Digital Logic โ€“ 13 74LS
This is a 4-bit adder
that you can program
as part of your Project.

3.5 Combinational Circuits

  • Decoders are another important type of combinational circuit.
  • Among other things, they are useful in selecting a memory location based on
a binary value placed on the address lines of a memory bus.
  • Address decoders with n inputs can select any of 2 n
locations.
  • Chapter 3: Digital Logic โ€“ 14
  • This is what a 2-to-4 decoder looks like on the inside.

If x = 0 and y = 1,

which output line

is enabled?

3.5 Combinational Circuits

  • Chapter 3: Digital Logic โ€“ 16 74LS One of Ten Decoder

3.5 Combinational Circuits

  • A multiplexer does just the opposite of a decoder.
  • It selects a single output from several inputs.
  • The particular input chosen for output is determined by the value of the multiplexerโ€™s control lines.
  • To be able to select among n inputs, log

n control lines are needed.

  • Chapter 3: Digital Logic โ€“ 17

This is a block

diagram for a

multiplexer.

3.5 Combinational Circuits

  • Chapter 3: Digital Logic โ€“ 19

3.5 Combinational Circuits

  • This shifter

moves the bits

of a nibble one

position to the

left or right.

  • Chapter 3: Digital Logic โ€“ 20

If S = 0, in which

direction do the

input bits shift?