## csc205 Notes 2011 01 11

Classes start at 5PM

Reading Assignment

Chapter 3 to page 112

3.1 unsigned integers, binary storage, integers, base conversion, range, additions carry bix

Notes:

Machines do not store numbers, they store symbols. We can interpret 10110110 as many different things.

Range of unsigned numbers:

2 bits 4 bits

x x x x x x

0 0 = 0 0 0 0 0 = 0

1 1 = 3 1 1 1 1 = 15

range of n bits is to 2^n – 1

numbers in n bits range is 2^n

Truth Table

Carry In x y sum Carry Out

0 0 0 0 0

0 0 1 1 0

0 1 0 1 0

0 1 1 0 0

The above acts like an xor

1 0 0 1 0

1 0 1 0 1

1 1 0 0 1

1 1 1 1 1

The above acts like an or

When you think about addition, think about the sum and the carry.

101001

000100

——— No carries, no error

101101

1 carry

101101

000110 carry in of i + 1 is carry out if i. Assume the carry in of the lsd is zero.

——–

101011

100111

110100

——– Error Condition Carry out of msb

Carry goes to the carry flag.

leave a comment