Please enable JavaScript.
Coggle requires JavaScript to display documents.
2.3 Data Representation and Data Types (Floating Point (1) Write the…
2.3 Data Representation and Data Types
Character Tables
ASCII - 7 bits (127 variations) - Used to map a generic keyboard. 0-31 are functions such as DEL and ENTER, the rest are characters such as "A" or "~".
Unicode - 16 bits - Allows many other characters and symbols from many other languages.
Negative Binary Numbers
Sign & Mag - Turn the front number into a 1. The MSB is now a minus sign
Two's Compliment - Start from the right, until the first 1. Flip the rest. The MSB is -128
Floating Point
1) Write the number out as a normal binary number. Eg. 22.75 = 00010110.1100
2) Move the decimal point to the front of the first 1. Eg. 000.101101100 (Moved 5)
3) Then remove any extra 0's and fill any other the end. Eg. 0101 1011 0000
4) Finally add the exponent. Eg. 0101 1011 0000 0101
Terms
Mantissa - Front part of a floating point number, contains the value of the number.
Exponent - Back part of a floating point number, shows how much it has been shifted.
Truncation - Using less bits to store a number, therefore making it less accurate.
Rounding - Same as truncation but if the first value being cut off is 1, then the next number is increased by 1. Eg. 0.0101 would go to 0.010 but rounding means it would be 0.011
Shifts
Logical Shift - Move all the bits up by 1, front digit is removed and a 0 is added to the back. Left is doubling, right is halving.
Arithmetic Shift - Same when going left, when going right, the MSB is replaced by what was there before. Used on signed (negative) numbers