View by Category

The presentation will start after a short

(15 second) video ad from one of our sponsors.

Hot tip: Video ads won’t appear to registered users who are logged in. And it’s free to register and free to log in!

(15 second) video ad from one of our sponsors.

Hot tip: Video ads won’t appear to registered users who are logged in. And it’s free to register and free to log in!

Loading...

PPT – BOOLEAN ALGEBRA PowerPoint presentation | free to download

The Adobe Flash plugin is needed to view this content

About This Presentation

Write a Comment

User Comments (0)

Transcript and Presenter's Notes

- Lecture 6
- BOOLEAN ALGEBRA
- and GATES
- Building a 32 bit processor
- PH 3 B.1-B.5

Lets Build a Processor

- Almost ready to move into chapter 5 and start

building a processor - First, lets review Boolean Logic and build the

ALU well need (Material from Appendix B)

Boolean Algebra

- In Boolean Algebra, all variables are 0 and 1 and

there are 3 operators - OR is written as as in A B, called logical

sum. (Sometimes denoted with A U B) - AND is written as , as in A B, (also denoted

AB) called the logical product. (Sometimes

denoted by A n B) - NOT is written as A. The result of NOT A is 0

if A is 1 and 1 if A is 0.

Laws of Boolean Algebra

- Identity law A 0 A and A 1 A
- Zero and One laws A 1 1 and A 0 0
- Inverse laws A A 1 and A A 0
- Commutative laws A B B A and A B B

A - Associative laws A (B C) (A B) C
- A (B C)

(A B) C - Distributive laws A (B C) A B A C
- A (B C)

(A B) (A C) - DeMorgans laws (A B) A B and
- (A B)

A B

Boolean Algebra Gates

- Problem Consider a logic function with three

inputs A, B, and C. Output D is true if at

least one input is true Output E is true if

exactly two inputs are true Output F is true

only if all three inputs are true - Show the truth table for these three functions.
- Show the Boolean equations for these three

functions. - Show an implementation consisting of inverters,

AND, and OR gates.

Truth Tables

Sum of Products

- The sum of products form is constructed from a

truth table by choosing only those inputs that

result in an output of 1 and forming the product

of the inputs that are 1 and the complements of

the inputs that are false. The sum of all such

products gives an implementation of the function. - For D this would mean D ABC ABC ABC

(7 terms in all). It works but we can do it

easier by noting that D ABC. - By one of DeMorgans Laws we have D A B C

Boolean Equations

- D A B C
- F ABC
- E ABC ABC ABC or
- E (AB BC AC) (ABC)
- It is easy to show the two equations for E are

equivalent by using truth tables or by using

DeMorgans law to change (ABC) into A B

C, then using the distributive law a few times.

Another example of Sum of Products

The sum of products gives D ABC ABC

ABC ABC

Simplification of Boolean Expressions

- The Karnaugh map is a graphic method that can

handle Boolean expressions up to 6 variables - It is a simplification method that uses the

following relations - x x 1 and y 1 1 y y
- Basic idea is the sum of two expressions can be

combined and simplified if they have a distance

of 1 where distance is defined as follows - The distance between two product terms is equal

to the number of literals that occur differently,

i.e., one is complemented while the other is not.

For example ABC and ABC have a distance of

1 whereas ABC and ABC have a distance of 2. - Now the sum of the distance 1 pair can be

simplified as follows - ABC ABC AB(C C) AB

A one-variable Boolean function. (a) Truth table.

(b) Karnaugh map.

A two-variable Boolean function. (a) Truth table.

(b) Karnaugh map

An illustrative three-variable Boolean function.

(a) Truth table. (b) Karnaugh map.

A four-variable Boolean function. (a) Truth

table. (b) Karnaugh map.

Karnaugh map for a four-variable map functions.

Typical map subcubes for the elimination of one

variable in a product term.

Typical map subcubes for the elimination of two

variables in a product term.

Typical map subcubes for the elimination of three

variables in a product term.

Addition

Adder

You can see that the carry out is correct with a

Karnaugh map if it is not obvious already

- bc
- 00 01 11 10
- 0 0 0 1 0
- a
- 1 0 1 1 1
- You have a column of two 1s that gives bc, a

left most row of two 1s that gives ac and a

right most row of two 1s that gives ab

Exclusive-Or

- Truth table
- x y x xor y (x xor y)
- 0 0 0 1
- 0 1 1 0
- 1 0 1 0
- 1 1 0 1
- Equation
- x xor y xy xy
- Where xy means x and y and x y means x or y

Exclusive-or continued

The following equation can be represented as (a

xor b) xor carryin

Proof (a xor b) xor ci (ab ab) ci (ab

ab) ci (ab ab) ci (ab ab) ci

. Note it is easily shown that (a xor b) ab

ab

Realization of a full binary adder

Parallel (Ripple) binary adder

A 32-bit Ripple Carry Adder/Subtractor

- Remember 2s complement is just
- complement all the bits
- add a 1 in the least significant bit

A 0111 ? 0111

B - 0110 ?

An ALU (arithmetic logic unit)

- Let's build an ALU to support the and and or

instructions - we'll just build a 1 bit ALU, and use 32 of

them - For AND just use an AND gate and
- for OR just use an OR gate

a

b

Review The Multiplexor

- Selects one of the inputs to be the output,

based on a control input - S causes A or B to be selected.
- Lets build our ALU using a MUX

note we call this a 2-input mux even

though it has 3 inputs!

0

1

Different Implementations

- Not easy to decide the best way to build

something - Don't want too many inputs to a single gate
- Dont want to have to go through too many gates
- for our purposes, ease of comprehension is

important - Let's look at a 1-bit ALU for addition
- How could we build a 1-bit ALU for add, and, and

or? - How could we build a 32-bit ALU?

cout a b a cin b cin sum a xor b xor cin

Building a 32 bit ALU

What about subtraction (a b) ?

- Two's complement approach just negate b and

add. - How do we negate?
- A very clever solution

Subtractor circuit from modified adder

Binary adder/subtractor

Adding a NOR function

- Can also choose to invert a. How do we get a

NOR b ? - Invert both a and b and input to an and gate

since (a b) ab

Tailoring the ALU to the MIPS

- Need to support the set-on-less-than instruction

(slt) - remember slt is an arithmetic instruction
- produces a 1 if rs lt rt and 0 otherwise
- use subtraction (a - b) lt 0 implies a lt b
- Need to support test for equality (beq t5, t6,

t7) - use subtraction (a - b) 0 implies a b

Supporting slt Can we figure out the idea?

Handling the most significant bit

All other bits for slt

Supporting slt

Equality Test

- If a b 0 in the slt test the two numbers are

equal. One can add a test for this by setting an

output flag, zero 1 if the two values are equal

and to 0 otherwise. - Therefore zero can be defined by
- Zero (Result31 Result30 Result0)
- It can then be added as output as in the

following diagram.

Equality

- Notice control lines0000 and0001 or0010

add0110 subtract0111 slt1100 NOR

- The right two bits
- are the operation
- Note zero is a 1
- when the result
- is zero!

Conclusion

- We can build an ALU to support the MIPS

instruction set - key idea use multiplexor to select the output

we want - we can efficiently perform subtraction using

twos complement - we can replicate a 1-bit ALU to produce a 32-bit

ALU - Important points about hardware
- all of the gates are always working
- the speed of a gate is affected by the number of

inputs to the gate - the speed of a circuit is affected by the number

of gates in series (on the critical path or

the deepest level of logic) - Our primary focus comprehension, however,
- Clever changes to organization can improve

performance (similar to using better algorithms

in software) - We saw this in multiplication, lets look at

addition now

Reading material for next time

- PH 3 B.6-B.11

About PowerShow.com

PowerShow.com is a leading presentation/slideshow sharing website. Whether your application is business, how-to, education, medicine, school, church, sales, marketing, online training or just for fun, PowerShow.com is a great resource. And, best of all, most of its cool features are free and easy to use.

You can use PowerShow.com to find and download example online PowerPoint ppt presentations on just about any topic you can imagine so you can learn how to improve your own slides and presentations for free. Or use it to find and download high-quality how-to PowerPoint ppt presentations with illustrated or animated slides that will teach you how to do something new, also for free. Or use it to upload your own PowerPoint slides so you can share them with your teachers, class, students, bosses, employees, customers, potential investors or the world. Or use it to create really cool photo slideshows - with 2D and 3D transitions, animation, and your choice of music - that you can share with your Facebook friends or Google+ circles. That's all free as well!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

You can use PowerShow.com to find and download example online PowerPoint ppt presentations on just about any topic you can imagine so you can learn how to improve your own slides and presentations for free. Or use it to find and download high-quality how-to PowerPoint ppt presentations with illustrated or animated slides that will teach you how to do something new, also for free. Or use it to upload your own PowerPoint slides so you can share them with your teachers, class, students, bosses, employees, customers, potential investors or the world. Or use it to create really cool photo slideshows - with 2D and 3D transitions, animation, and your choice of music - that you can share with your Facebook friends or Google+ circles. That's all free as well!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

presentations for free. Or use it to find and download high-quality how-to PowerPoint ppt presentations with illustrated or animated slides that will teach you how to do something new, also for free. Or use it to upload your own PowerPoint slides so you can share them with your teachers, class, students, bosses, employees, customers, potential investors or the world. Or use it to create really cool photo slideshows - with 2D and 3D transitions, animation, and your choice of music - that you can share with your Facebook friends or Google+ circles. That's all free as well!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

Recommended

«

/ »

Page of

«

/ »

Promoted Presentations

Related Presentations

Page of

Page of

CrystalGraphics Sales Tel: (800) 394-0700 x 1 or Send an email

Home About Us Terms and Conditions Privacy Policy Contact Us Send Us Feedback

Copyright 2015 CrystalGraphics, Inc. — All rights Reserved. PowerShow.com is a trademark of CrystalGraphics, Inc.

Copyright 2015 CrystalGraphics, Inc. — All rights Reserved. PowerShow.com is a trademark of CrystalGraphics, Inc.

The PowerPoint PPT presentation: "BOOLEAN ALGEBRA" is the property of its rightful owner.

Do you have PowerPoint slides to share? If so, share your PPT presentation slides online with PowerShow.com. It's FREE!

Committed to assisting Uh University and other schools with their online training by sharing educational presentations for free