Coding Part 2
Weight of the Digit 3672 Thousands (10 3 )Hundreds (10 2 )Tens (10 1 )Units (1) = Weights Decimal Example (3672) 10 Binary Example (1011) EightsFourstwosunits =
Number of Possibilities Binary (base= 2) Number of possibilities = (B) n B : Base n : # of Digits DDDD DD D DDD
Number of Possibilities Decimal (Base =10) Number of possibilities = (B) n B : Base n : # of Digits DD D DDD
Number of Possibilities Octal(Base =8) Number of possibilities = (B) n 1 Digit Number of possibilities = (8) 1 =8 2 Digits Number of possibilities = (8) 2 =64 5 Digits Number of possibilities = (8) 5 = Number of possibilities = (B) n 1 Digit Number of possibilities = (16) 1 =16 2 Digits Number of possibilities = (16) 2 =256 5 Digits Number of possibilities = (16) 5 = Hexadecimal (Base =16)
Conversion Table Binary Base =2 = (2) 1 Octal Base = 8= (2) 3 Hexadecimal Base =16 = (2) 4 Their base have number 2 as a common That’s why – 1 Octal digit equivalent to 3 Binary – 1 Hex digit equivalent to 4 Binary digits * Look at the table and notice binary columns
Binary Addition = = = =10 * Look at the table and notice binary columns
Binary Addition How do we do Decimal Addition ? =5+5 =10-B = =5+7 =12 –B = Case 1: the result is less than Base Case 2: the result equals Base Case 3: the result is higher than Base Do it for Binary