Boolean Algebra 2 Homework #3 Review 2.33(a) Convert - - PowerPoint PPT Presentation

boolean algebra
SMART_READER_LITE
LIVE PREVIEW

Boolean Algebra 2 Homework #3 Review 2.33(a) Convert - - PowerPoint PPT Presentation

Computer Systems and Networks ECPE 170 Jeff Shafer University of the Pacific Boolean Algebra 2 Homework #3 Review 2.33(a) Convert


slide-1
SLIDE 1

ì ¡

Computer ¡Systems ¡and ¡Networks ¡

ECPE ¡170 ¡– ¡Jeff ¡Shafer ¡– ¡University ¡of ¡the ¡Pacific ¡

Boolean ¡Algebra ¡

slide-2
SLIDE 2

Homework ¡#3 ¡Review ¡– ¡2.33(a) ¡

ì

Convert ¡12.5 ¡to ¡IEEE ¡754 ¡single ¡precision ¡floa9ng ¡point: ¡

ì

Format ¡requirements ¡for ¡single ¡precision ¡(32 ¡bit ¡total ¡length): ¡

ì

1 ¡sign ¡bit ¡

ì

8 ¡bit ¡exponent ¡(which ¡uses ¡a ¡bias ¡of ¡127) ¡

ì

23 ¡bit ¡significant ¡(which ¡has ¡an ¡implied ¡1. ¡that ¡is ¡not ¡stored ¡in ¡the ¡field) ¡ ì

Convert ¡12.5 ¡to ¡binary: ¡ ¡1100.1 ¡x ¡20 ¡

ì

Normalize ¡it ¡in ¡the ¡IEEE ¡way: ¡ ¡1.1001 ¡x ¡23 ¡

ì

Bias ¡exponent: ¡3 ¡+ ¡127 ¡= ¡130 ¡(10000010 ¡in ¡binary) ¡ ì

Result ¡

ì

Sign ¡bit: ¡0 ¡

ì

Exponent ¡(8 ¡bits): ¡10000010 ¡

ì

ManVssa ¡(23 ¡bits): ¡10010000000000000000000 ¡ ¡(padded ¡out ¡to ¡23 ¡bits, ¡leading ¡1 ¡not ¡shown!) ¡

ì

Thus, ¡0 ¡| ¡10000010 ¡| ¡10010000000000000000000 ¡

¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

2 ¡

slide-3
SLIDE 3

Objectives ¡

ì Chapter ¡3 ¡in ¡textbook ¡ ì Understand ¡the ¡relaVonship ¡between ¡Boolean ¡logic ¡

and ¡digital ¡computer ¡circuits ¡

ì Design ¡simple ¡logic ¡circuits ¡ ì Understand ¡how ¡simple ¡digital ¡circuits ¡are ¡

combined ¡to ¡form ¡complex ¡computer ¡systems ¡

ì Essen9al ¡concepts ¡only ¡– ¡There’s ¡a ¡whole ¡course ¡

(ECPE ¡71) ¡devoted ¡to ¡this ¡topic! ¡

3 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-4
SLIDE 4

Survey ¡

ì How ¡many ¡people ¡are ¡in ¡ECPE ¡71 ¡(Digital ¡Design) ¡

this ¡semester? ¡

ì How ¡many ¡people ¡have ¡taken ¡ECPE ¡71 ¡in ¡past ¡

semesters? ¡ ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

4 ¡

slide-5
SLIDE 5

Origin ¡of ¡Boolean ¡Algebra ¡

ì “The ¡Laws ¡of ¡Thought” ¡wriaen ¡by ¡George ¡Boole ¡in ¡

1854 ¡

ì Invented ¡symbol ¡or ¡Boolean ¡logic ¡ ì Goal: ¡Represent ¡logical ¡thought ¡through ¡

mathemaVcal ¡equaVons ¡ ì Computers ¡today ¡essenVally ¡implement ¡Boole’s ¡

Laws ¡of ¡Thought ¡

ì Early ¡computer ¡pioneers ¡(John ¡Atanasoff ¡and ¡Claude ¡

Shannon) ¡were ¡among ¡the ¡first ¡to ¡see ¡this ¡ connecVon ¡

5 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-6
SLIDE 6

Boolean ¡Algebra ¡

ì Boolean ¡algebra ¡is ¡a ¡mathemaVcal ¡system ¡for ¡the ¡

manipulaVon ¡of ¡variables ¡that ¡can ¡have ¡one ¡of ¡two ¡ values ¡

ì Formal ¡logic: ¡ ¡

ì Values ¡of ¡“true” ¡and ¡“false” ¡

ì Digital ¡systems: ¡ ¡

ì Values ¡of ¡“on”/“off”, ¡1 ¡/ ¡0, ¡“high”/ ¡“low” ¡

ì Boolean ¡expressions ¡are ¡created ¡by ¡performing ¡

  • peraVons ¡on ¡Boolean ¡variables ¡

ì Common ¡Boolean ¡operators: ¡AND, ¡OR, ¡NOT ¡

6 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-7
SLIDE 7

AND ¡Truth ¡Table ¡

x y xy 0 ¡ 0 ¡ 0 ¡ 0 ¡ 1 ¡ 0 ¡ 1 ¡ 0 ¡ 0 ¡ 1 ¡ 1 ¡ 1 ¡

7 ¡

AND: ¡Referred ¡to ¡as ¡“Boolean ¡Product” ¡ Truth ¡Table: ¡shows ¡all ¡possible ¡inputs ¡and ¡outputs ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-8
SLIDE 8

OR ¡Truth ¡Table ¡

x y x+y 0 ¡ 0 ¡ 0 ¡ 0 ¡ 1 ¡ 1 ¡ 1 ¡ 0 ¡ 1 ¡ 1 ¡ 1 ¡ 1 ¡

8 ¡

OR: ¡Referred ¡to ¡as ¡“Boolean ¡Sum” ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-9
SLIDE 9

NOT ¡Truth ¡Table ¡

x x 0 ¡ 1 ¡ 1 ¡ 0 ¡

9 ¡

Overbar ¡symbol ¡means ¡“not” ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-10
SLIDE 10

Boolean ¡Algebra ¡

ì A ¡Boolean ¡funcVon ¡has: ¡

ì At ¡least ¡one ¡Boolean ¡variable, ¡ ¡ ì At ¡least ¡one ¡Boolean ¡operator, ¡and ¡ ¡ ì At ¡least ¡one ¡input ¡from ¡the ¡set ¡{0,1} ¡

ì It ¡produces ¡an ¡output ¡that ¡is ¡also ¡a ¡member ¡of ¡the ¡

set ¡{0,1} ¡

10 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-11
SLIDE 11

Boolean ¡Algebra ¡

ì Example ¡truth ¡table ¡for ¡funcVon ¡ ì The ¡shaded ¡column ¡in ¡the ¡middle ¡

is ¡opVonal ¡

ì

Make ¡evaluaVon ¡of ¡subparts ¡ easier ¡

11 ¡

Func:on ¡Inputs ¡ Func:on ¡Output ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

“Show ¡your ¡work” ¡

slide-12
SLIDE 12

Order ¡of ¡Operations ¡

ì High ¡to ¡low ¡priority ¡

ì

NOT ¡operator ¡

ì

AND ¡operator ¡

ì

OR ¡operator ¡ ì This ¡is ¡how ¡we ¡chose ¡the ¡

(shaded) ¡funcVon ¡subparts ¡ in ¡our ¡table. ¡

12 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-13
SLIDE 13

Simplification ¡

ì Digital ¡computers ¡implement ¡Boolean ¡func9ons ¡in ¡

hardware ¡

ì The ¡simpler ¡the ¡Boolean ¡funcVon, ¡the ¡smaller ¡the ¡circuit ¡

that ¡implements ¡it ¡

ì What ¡advantages ¡do ¡we ¡get ¡from ¡a ¡smaller ¡circuit? ¡

ì

Simpler ¡circuits ¡are ¡cheaper ¡to ¡build ¡

ì

Smaller ¡circuits ¡consume ¡less ¡power ¡

ì

Smaller ¡circuits ¡run ¡faster ¡than ¡complex ¡circuits ¡ ì Goal: ¡reduce ¡Boolean ¡funcVons ¡to ¡their ¡simplest ¡form! ¡

13 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-14
SLIDE 14

Boolean ¡Identities ¡

ì IdenVVes ¡can ¡help ¡simplify ¡Boolean ¡funcVons ¡

ì Most ¡idenVVes ¡have ¡two ¡forms: ¡ ¡

AND ¡(product) ¡form, ¡OR ¡(sum) ¡form ¡

ì These ¡idenVVes ¡are ¡intuiVve: ¡

14 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-15
SLIDE 15

More ¡Boolean ¡Identities ¡

ì Are ¡these ¡familiar ¡from ¡algebra? ¡

15 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-16
SLIDE 16

Even ¡More ¡Boolean ¡Identities ¡

ì Familiar ¡from ¡a ¡formal ¡logic ¡class? ¡ ì These ¡are ¡very ¡useful! ¡

16 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-17
SLIDE 17

DeMorgan’s ¡Law ¡

ì SomeVmes ¡it ¡is ¡more ¡economical ¡to ¡build ¡a ¡circuit ¡

using ¡the ¡complement ¡of ¡a ¡funcVon ¡(and ¡ complemenVng ¡its ¡result) ¡than ¡it ¡is ¡to ¡implement ¡ the ¡funcVon ¡directly ¡

ì DeMorgan’s ¡law ¡makes ¡finding ¡the ¡complement ¡

easy: ¡

17 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-18
SLIDE 18

DeMorgan’s ¡Law ¡

ì Easy ¡to ¡extend ¡DeMorgan’s ¡law ¡to ¡any ¡number ¡of ¡

variables ¡with ¡a ¡2-­‑step ¡process ¡

1.

Replace ¡each ¡variable ¡by ¡its ¡complement ¡

2.

Change ¡all ¡ANDs ¡to ¡ORs ¡and ¡ORs ¡to ¡ANDs ¡ ì Example: ¡

18 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

F(X,Y, Z) = (XY)+(XZ)+(YZ)

slide-19
SLIDE 19

Boolean ¡Algebra ¡

ì Example: ¡Use ¡Boolean ¡idenVVes ¡to ¡simplify

¡ ¡

19 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-20
SLIDE 20

Boolean ¡Algebra ¡

ì Simplified: ¡

20 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-21
SLIDE 21

Boolean ¡Algebra ¡

ì Simplify ¡ ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

21 ¡

F(x, y) = x(x + y)+(y+ x)(x + y)

slide-22
SLIDE 22

Canonical ¡Forms ¡

ì Numerous ¡ways ¡to ¡state ¡the ¡same ¡Boolean ¡

expression ¡

ì “Synonymous” ¡forms ¡are ¡logically ¡equivalent ¡(have ¡

idenVcal ¡truth ¡tables) ¡ ì Challenge: ¡Confusing! ¡ ì SoluVon: ¡Designers ¡express ¡Boolean ¡funcVons ¡in ¡

standardized ¡or ¡canonical ¡form ¡

ì Simplifies ¡construcVon ¡of ¡circuit ¡

22 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-23
SLIDE 23

Canonical ¡Forms ¡

ì There ¡are ¡two ¡canonical ¡forms ¡for ¡Boolean ¡

expressions: ¡sum-­‑of-­‑products ¡and ¡product-­‑of-­‑sums ¡

ì Boolean ¡product ¡is ¡the ¡AND ¡operaVon ¡ ì Boolean ¡sum ¡is ¡the ¡OR ¡operaVon. ¡

ì In ¡the ¡sum-­‑of-­‑products ¡form, ¡ANDed ¡variables ¡are ¡

ORed ¡together ¡ ¡

ì In ¡the ¡product-­‑of-­‑sums ¡form, ¡ORed ¡variables ¡are ¡

ANDed ¡together: ¡ ¡

23 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-24
SLIDE 24

Canonical ¡Forms ¡

ì Sum-­‑of-­‑Products ¡form: ¡Easy ¡to ¡

read ¡off ¡of ¡a ¡truth ¡table ¡

ì Look ¡for ¡lines ¡where ¡the ¡funcVon ¡

is ¡true ¡(=1). ¡

ì

List ¡the ¡input ¡values ¡

ì

OR ¡each ¡group ¡of ¡variables ¡ together ¡

24 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-25
SLIDE 25

Canonical ¡Forms ¡

ì Sum-­‑of-­‑Products ¡form ¡

25 ¡

This ¡is ¡not ¡in ¡simplest ¡terms, ¡ ¡ but ¡it ¡is ¡in ¡canonical ¡sum-­‑of-­‑products ¡form ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡