Tuesday, 17 November 2015 Return exams New sample NASM program in - - PowerPoint PPT Presentation

tuesday 17 november 2015
SMART_READER_LITE
LIVE PREVIEW

Tuesday, 17 November 2015 Return exams New sample NASM program in - - PowerPoint PPT Presentation

Tuesday, 17 November 2015 Return exams New sample NASM program in repo Questions about projects or labs? Back to logic gates and circuits Last Time We developed a table for a simple one-bit adder: a b sum carry 0 0 0 0 0 1 1 0 1


slide-1
SLIDE 1

Tuesday, 17 November 2015

Return exams New sample NASM program in repo Questions about projects or labs? Back to logic gates and circuits

slide-2
SLIDE 2

Last Time

We developed a table for a simple one-bit adder:

a b sum carry 1 1 1 1 1 1 1

slide-3
SLIDE 3

Adder

a b sum carry 1 1 1 1 1 1 1

sum = a xor b carry = ab This is called a “half adder”

slide-4
SLIDE 4

Full Adder

a b carry in sum carry out 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

slide-5
SLIDE 5

Full Adder

a b carry in sum carry out 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

sum = a xor b xor cin cout = a.b + a.cin + b.cin Let’s let logisim build this for us:

slide-6
SLIDE 6

Full Adder

Select “Project/Analyze circuit” from the logisim menu

slide-7
SLIDE 7

Full Adder

slide-8
SLIDE 8

Using Full Adders

To add two 32-bit integers A = A31...A3A2A1A0 and B = B31...B3B2B1B0 to get sum S = S31...S3S2S1S0

...

… just string together 32 full adders:

By en:User:Cburnett [GFDL (http://www.gnu.

  • rg/copyleft/fdl.html) or CC-BY-SA-3.0 (http:

//creativecommons.org/licenses/by-sa/3.0/)], via Wikimedia Commons

slide-9
SLIDE 9

Another Useful Circuit: Multiplexer

A common need in designing is a circuit is to “select” an

  • utput from two or more smaller circuits. For instance, we

may have a sub-circuit “A” that has the result of an “and”

  • peration, another subcircuit “B” that has the result of an

“or” operation, and a “control signal” “C” (either 0 or 1) that chooses one of these two results:

A B A C = 0 A B B C = 1

slide-10
SLIDE 10

Another Useful Circuit: Multiplexer

A B B C = 1 A B A C = 0

C A B OUT 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

slide-11
SLIDE 11

Multiplexer in Logisim

slide-12
SLIDE 12

Still Need to Add Slides for ...

Karnaugh maps (see Thursday’s notes)