1 / 8

Coding Part 2

Lesson 2 0x002 010. Coding Part 2. Weight of the Digit. Weights Decimal Example (3672) 10 Binary Example (1011) 2. Number of Possibilities. Binary (base= 2). 2. 4. 8. 16. Number of possibilities = (B) n. B : Base n : # of Digits. Number of Possibilities. Decimal (Base =10).

oksana
Download Presentation

Coding Part 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lesson 2 0x002010 Coding Part 2

  2. Weight of the Digit • Weights • Decimal Example (3672)10 • Binary Example (1011)2

  3. Number of Possibilities • Binary (base= 2) 2 4 8 16 Number of possibilities = (B)n B : Base n : # of Digits

  4. Number of Possibilities • Decimal (Base =10) 10 1000 100 Number of possibilities = (B)n B : Base n : # of Digits

  5. Number of Possibilities Hexadecimal (Base =16) • Octal(Base =8) Number of possibilities = (B)n Number of possibilities = (B)n 1 Digit Number of possibilities = (8)1 =8 1 Digit Number of possibilities = (16)1 =16 2 Digits Number of possibilities = (8)2 =64 2 Digits Number of possibilities = (16)2 =256 5 Digits Number of possibilities = (8)5 = 32768 5 Digits Number of possibilities = (16)5 = 11029518992652895256576

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

More Related