Day2 - o Offset or Bias range -7 to 8 (just shift number...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Day 2 Binary o Blahblahblah Operations in Propositional Calc o AND = * o OR = + o NOT = ‘ Start with “counting” numbers o Positive integers o Good at measuring ho much stuff I have o Closed under addition and multiplication If a, b are numbers, a+b is too If a, b are numbers, a x b is too o Incorporate 0 into number system Negative Numbers Next you have rational numbers o Followed by irrational numbers Complex numbers o 2 component numbers (like vectors) o 1 st component is called “real” o 2 nd component is called “imaginary” o Fundamental Theorem of Algebra Negative numbers in binary o Unsigned int – range 0 to 15 (0000 to 1111)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: o Offset or Bias range -7 to 8 (just shift number values to the left) This is bad for computation o 4 bit Sign-Magnitude 1 st bit encodes sign (0 positive, 1 negative) bits 2, 3, 4 magnitude range 0 to 7 (000 to 111) Overall range -7 to 7 (1000 = -0) With n bits, use n-1 bits for magnitude o 2s (radix) compliment Use negative weight for 1 st bit Overall range -8 to +7 1 st bit is still sign bit (0 = positive, 1 = negative) Properties Least significant n-1 bits have unaltered meaning Most significant bit has weight negated...
View Full Document

Ask a homework question - tutors are online