Digital Logic Devices (transistors, etc.) Solid-State Physics - - PowerPoint PPT Presentation

digital logic
SMART_READER_LITE
LIVE PREVIEW

Digital Logic Devices (transistors, etc.) Solid-State Physics - - PowerPoint PPT Presentation

9/8/15 Program, Application WELLESLEY CS WELLESLEY CS CS 240, Fall 2014 CS 240, Fall 2014 Software Programming Language Compiler/Interpreter Digital Logic Operating System Instruction Set Architecture Gate way


slide-1
SLIDE 1

9/8/15 1

WELLESLEY CS

CS 240, Fall 2014

Digital ¡Logic

Gateway ¡to ¡computer ¡science

WELLESLEY CS

CS 240, Fall 2014

Devices ¡(transistors, ¡etc.) Solid-­‑State ¡ Physics

Hardware

Digital ¡Logic

Microarchitecture Instruction ¡ Set ¡Architecture Operating ¡ System Programming ¡ Language Compiler/Interpreter Program, ¡ Application

Software

WELLESLEY CS

CS 240, Fall 2014

Digital ¡logic ¡values

A ¡digital ¡circuit ¡has ¡only ¡two ¡logical ¡values ¡present.

*Exact ¡voltage ¡levels ¡and ¡their ¡ interpretation ¡ varies ¡ with ¡technology.

0.0V 0.5V 2.8V 3.3V 1

1, ¡true, ¡asserted

0, ¡false, ¡ unasserted

WELLESLEY CS

CS 240, Fall 2014

Transistors

Very ¡fast ¡binary ¡switches.

Base Collector +Vcc (Supply ¡Voltage) Emitter (Circuit ¡ Ground)

slide-2
SLIDE 2

9/8/15 2

WELLESLEY CS

CS 240, Fall 2014

Tiny ¡electronic ¡devices ¡that ¡compute ¡functions ¡on ¡two-­‑valued ¡signals.

Logic ¡Gates

Vin +Vcc Vout

NAND

V1

+Vcc Vout

V2

NOT

WELLESLEY CS

CS 240, Fall 2014

Integrated ¡ Circuits ¡ (invented ¡ 1950s)

Gates ¡are ¡manufactured ¡in ¡units ¡called ¡integrated ¡circuits. From ¡SSI ¡(tens) ¡to ¡VLSI ¡(hundreds ¡of ¡thousands ¡to ¡billions)

Wafer Chip

WELLESLEY CS

CS 240, Fall 2014

Five ¡basic ¡gates

NOT NAND NOR AND OR

*Gates ¡with ¡ more ¡than ¡two ¡ inputs ¡ are ¡possible:

Define ¡with ¡truth ¡ tables.

WELLESLEY CS

CS 240, Fall 2014

Design ¡new ¡gates ¡from ¡old

exclusive ¡or often ¡used ¡as ¡a ¡one-­‑bit ¡comparator.

XOR

Future ¡video ¡game ¡designers, ¡Halloween ¡costumers ¡extraordinaire, ¡sci-­‑fi/fantasy ¡screenwriters, I ¡have ¡an ¡idea…

slide-3
SLIDE 3

9/8/15 3

WELLESLEY CS

CS 240, Fall 2014

Ga Gates of

  • f XOR

XOR

Exclusive preview , or something.

WELLESLEY CS

CS 240, Fall 2014

Boolean ¡Algebra

A B A ¡B (A ¡·√ ¡B) A B A ¡+ ¡B A A A A

wires ¡= ¡variables gates ¡= ¡simple ¡functions

AND ¡= ¡Boolean ¡product OR ¡= ¡Boolean ¡sum NOT ¡= ¡inverse ¡or ¡complement wire ¡= ¡identity ·√ 1 1 1 + 1 1 1 1 1 1 1 1 1

WELLESLEY CS

CS 240, Fall 2014

Boolean ¡expressions, circuit ¡equivalence

A B = A B A ¡+ ¡B A A A A ¡+ ¡B 0 ¡+ ¡A = A A ¡A = A Notice ¡the ¡bubble... ¡familiar?

WELLESLEY CS

CS 240, Fall 2014

Name ¡that ¡rule

A B = = A ¡+ ¡B B A B ¡+ ¡A A B C (AB)C AB A B C A(BC) BC

slide-4
SLIDE 4

9/8/15 4

WELLESLEY CS

CS 240, Fall 2014

Rules, ¡rules, ¡rules

A A A 0 ¡A = A A A ¡+ ¡A =

WELLESLEY CS

CS 240, Fall 2014

DeMorgan's Law

(double ¡bubble, ¡toil ¡and ¡trouble, ¡in ¡Randy's ¡words...) A A ¡+ ¡B B A B = A B A ¡B = A B A ¡+ ¡B = A ¡+ ¡B

WELLESLEY CS

CS 240, Fall 2014

Take ¡care

A 1 A ¡+ ¡1 = A A ¡+ ¡AB B = AB

WELLESLEY CS

CS 240, Fall 2014

A ¡universal ¡gate*

*Are ¡there ¡others?

Let's ¡prove ¡it! ¡ ¡Build ¡AND, ¡OR, ¡NOR, ¡NOT ¡using ¡only ¡NAND.

slide-5
SLIDE 5

9/8/15 5

WELLESLEY CS

CS 240, Fall 2014

Circuit ¡simplification

Can ¡we ¡find ¡a ¡simpler ¡circuit ¡that ¡performs ¡the ¡same ¡function?* Start ¡with ¡an ¡equivalent ¡Boolean ¡expression F(A, ¡B, ¡C) ¡= ¡

*All ¡ other ¡things ¡ equal, ¡ smaller ¡ circuits ¡ are ¡cheaper , ¡ faster , ¡cooler , ¡ and ¡easier ¡ to ¡ design.

Check ¡with ¡a ¡truth ¡table... ¡with ¡3 ¡inputs?

WELLESLEY CS

CS 240, Fall 2014

Code ¡detectors

A ¡four ¡input ¡AND ¡gate ¡recognizes ¡exactly ¡one ¡input ¡code. Design ¡a ¡code ¡detector ¡that ¡recognizes ¡ABCD ¡= ¡1001. Design ¡a ¡code ¡detector ¡that ¡recognizes ¡either ¡ABCD ¡= ¡1001 ¡or ¡ABCD ¡= ¡1111.

A B C D WELLESLEY CS

CS 240, Fall 2014

Voting ¡machines

A ¡majority ¡circuit outputs ¡1 ¡whenever ¡a ¡majority ¡of ¡its ¡inputs ¡equal ¡1. Design ¡a ¡simple ¡majority ¡circuit ¡for ¡three ¡inputs.

A B C Majority 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

WELLESLEY CS

CS 240, Fall 2014

Sum ¡of ¡products

A ¡sum ¡of ¡productsrepresentation ¡is

the ¡logical ¡sum ¡(OR)

  • f ¡products ¡(AND)
  • f ¡inputs ¡or ¡their ¡complements ¡(NOT).

Digital ¡ circuits 13-­‑21

Try ¡building ¡for ¡E: ¡ ¡Think ¡of ¡summing/ORing code ¡detectors.