ITEC 1000 Lecture Notes - Radix, Modulus Guitars, Negative Number
Document Summary
Itec 1000 winter 2010 peter khaiter. Lecture 4 representing integer data jan 25. An integer is a number which has no fraction part. Numbers can be represented as a combination of: value or magnitude, sign (plus or minus) Binary representation generally preferred: greater range of value for given number of bits, calculations easier. Bcd is still used precision: in business applications to maintain decimal rounding and decimal, in applications with a lot of input and output, but limited calculations. No obvious direct way to represent the sign in binary notation. Options: sign-and-magnitude representation, 1"s complement, 2"s complement (most common) Sign-and-magnitude algorithms complex and difficult to implement in hardware: must test for 2 values of 0, useful with bcd, order of signed number and carry/borrow makes a difference. Sign of the number does not have to be handled separately. Consistent for all different signed combinations of input numbers.