Presentation is loading. Please wait.

Presentation is loading. Please wait.

Coding Part 2. Weight of the Digit 3672 Thousands (10 3 )Hundreds (10 2 )Tens (10 1 )Units (1) 3000 +600+70+2 = Weights Decimal Example (3672) 10 Binary.

Similar presentations


Presentation on theme: "Coding Part 2. Weight of the Digit 3672 Thousands (10 3 )Hundreds (10 2 )Tens (10 1 )Units (1) 3000 +600+70+2 = Weights Decimal Example (3672) 10 Binary."— Presentation transcript:

1 Coding Part 2

2 Weight of the Digit 3672 Thousands (10 3 )Hundreds (10 2 )Tens (10 1 )Units (1) 3000 +600+70+2 = Weights Decimal Example (3672) 10 Binary Example (1011) 2 1011 EightsFourstwosunits 8+0+2+1 =

3 Number of Possibilities Binary (base= 2) Number of possibilities = (B) n B : Base n : # of Digits DDDD 0000 0001 0010 0011 1111 16 DD 00 01 10 11 4 D 0 1 2 DDD 000 001 010 011 100 101 110 111 8

4 Number of Possibilities Decimal (Base =10) Number of possibilities = (B) n B : Base n : # of Digits DD 00 01 02 03 04 05 99 100 D 0 1 2 3 4 5 6 7 8 9 10 DDD 000 001 002 003 04 005 006 999 1000

5 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 = 32768 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 = 11029518992652895256576 Hexadecimal (Base =16)

6 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

7 Binary Addition 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 =10 * Look at the table and notice binary columns

8 Binary Addition How do we do Decimal Addition ? 1 5 1 5 + ----- 30 =5+5 =10-B =0 1 1 5 1 7 + ----- 32 =5+7 =12 –B =2 1 1 5 1 3 + ----- 28 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 00 01+ ----- 01 01+ ----- 10 01 01+ ----- 11


Download ppt "Coding Part 2. Weight of the Digit 3672 Thousands (10 3 )Hundreds (10 2 )Tens (10 1 )Units (1) 3000 +600+70+2 = Weights Decimal Example (3672) 10 Binary."

Similar presentations


Ads by Google