L16_arithmetic_circ

L16_arithmetic_circ - Arithmetic Circuits ! Numbers as...

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

View Full Document Right Arrow Icon
6.02 Spring 2008 Arithmetic Circuits, Slide 1 Arithmetic Circuits Numbers as bits: two’s complement Addition: ripple-carry adders Multiplication: unsigned and signed Intro to registers Encoding numbers 6.02 Spring 2008 Arithmetic Circuits, Slide 2 ! " = = 1 n 0 i b 2 v 2 11 2 10 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 0 1 1 1 1 1 0 1 0 0 0 0 0 3720 Octal - base 8 000 - 0 001 - 1 010 - 2 011 - 3 100 - 4 101 - 5 110 - 6 111 - 7 0x 7d0 Hexadecimal - base 16 0000 - 0 1000 - 8 0001 - 1 1001 - 9 0010 - 2 1010 - a 0011 - 3 1011 - b 0100 - 4 1100 - c 0101 - 5 1101 - d 0110 - 6 1110 - e 0111 - 7 1111 - f Oftentimes we will find it convenient to cluster groups of bits together for a more compact notation. Two popular groupings are clusters of 3 bits and 4 bits. It is straightforward to encode positive integers as a sequence of bits. Each bit is assigned a weight. Ordered from right to left, these weights are increasing powers of 2. The value of an n-bit number encoded in this fashion is given by the following formula: = 2000 10 Seems natural to me! 0 d 7
Background image of page 1

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

View Full DocumentRight Arrow Icon
Representing negative integers 6.02 Spring 2008 Arithmetic Circuits, Slide 3 To keep our arithmetic circuits simple, we’d like to find a representation for negative numbers so that we can use a single operation (binary addition) when we wish to find the sum of two integers, independent of whether they are positive are negative. We certainly want A + (-A) = 0. Consider the following 8-bit binary addition where we only keep 8 bits of the result: 11111111 + 00000001 00000000 which implies that the 8-bit representation of -1 is 11111111.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/23/2009 for the course EECS 6.02 taught by Professor Terman during the Spring '08 term at MIT.

Page1 / 8

L16_arithmetic_circ - Arithmetic Circuits ! Numbers as...

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

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