L09-ArithmeticCircuits - Arithmetic Circuits Didnt I learn...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
L9 – Arithmetic Circuits 1 Comp 411 – Fall 2009 10/14/09 Arithmetic Circuits 01011 +00101 10000 Didn’t I learn how to do addition in the second grade? UNC courses aren’t what they used to be. .. Finally; time to build some serious functional blocks We’ll need a lot of boxes
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
L9 – Arithmetic Circuits 2 Comp 411 – Fall 2009 10/14/09 Review: 2’s Complement 2 0 2 1 2 2 2 3 2 N-2 -2 N-1 N bits 8-bit 2’s complement example: 11010110 = –2 7 + 2 6 + 2 4 + 2 2 + 2 1 = – 128 + 64 + 16 + 4 + 2 = – 42 If we use a two’s-complement representation for signed integers, the same binary addition procedure will work for adding both signed and unsigned numbers. By moving the implicit “binary” point, we can represent fractions too: 1101.0110 = –2 3 + 2 2 + 2 0 + 2 -2 + 2 -3 = – 8 + 4 + 1 + 0.25 + 0.125 = – 2.625 “sign bit” “binary” point Range: – 2 N-1 to 2 N-1 – 1
Background image of page 2
L9 – Arithmetic Circuits 3 Comp 411 – Fall 2009 10/14/09 Binary Addition Here’s an example of binary addition as one might do it by “hand”: A: 1101 B:+ 0101 10010 1 0 1 1 Carries from previous column Adding two N-bit numbers produces an (N+1)-bit result Then we can cascade them to add two numbers of any size… A B CO CI S FA A B CO CI S FA A B CO CI S FA A B CO CI S FA A3 B3 A2 B2 A1 B1 A0 B0 S4 S3 S0 S1 S0 Let’s start by building a block that adds one column: called a “full adder” (FA) A B CO CI S FA
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
L9 – Arithmetic Circuits 4 Comp 411 – Fall 2009 10/14/09 Designing a “Full Adder”: From Last Lecture 1) Start with a truth table: 2) Write down eqns for the “1” outputs C o = C i AB + C i AB + C i AB + C i AB S = C i AB + C i AB + C
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/31/2009 for the course COMPUTER computer 1 taught by Professor Abedauthman during the Spring '08 term at Aarhus Universitet.

Page1 / 14

L09-ArithmeticCircuits - Arithmetic Circuits Didnt I learn...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online