180 likes | 198 Views
chapter 3. The Basics of Binary Numbers. Digital Computers represent information using two symbols, 0 and 1. Owing to its straightforward implementation in electronic circuitry, the binary system is used by virtually all modern computers. Bits & Bytes. Decimal Digits (base 10):
E N D
chapter3 The Basics of Binary Numbers Digital Computers represent information using two symbols, 0 and 1. Owing to its straightforward implementation in electronic circuitry, the binary system is used by virtually all modern computers.
Bits & Bytes Decimal Digits (base 10): 0,1, 2, .., 9 Binary digIT = BIT (base 2): 0, 1 Byte: group of 8 bits (IPv4 Octet) 01100010
Bit Patterns: 01100001101.. length of pattern = 1 2 patterns 0 1 length of pattern = 2 4 patterns 00 01 10 11
Binary Patterns.. length of pattern = 3 8 patterns 000 001 010 011 100 101 110 111
Binary patterns.. length of pattern = 4 16 patterns 0000 0001 . . . 1110 1111 • Adding one bit to the length doubles the number of patterns • 2n patterns, n = number of bits
The Power of Powers of 2.. Let’s Make a Deal! Monty Hall offers you— Deal #1: $108,256,887,912.00OR Deal #2 . .
The Power of Powers of 2.. Deal #2: A chessboard—On the first square one penny, and on the second square, two pennies, on the third, four pennies, and so forth, until the last square is reached. You get all the pennies.Beware the Zonk! Better ask the audience . .
Exercises (Optional ;-) On what square of the chessboard did the cumulative amount exceed Deal #1? Is there a single square containing an amount >= to Deal #1? If so, what is the first square contains enough pennies to beat Deal #1? If the pennies on square 64 were placed in a single stack, how high would it be? If all the pennies on the board were placed in a single stack, how high would it be?
The Power of the Powers of 2.. Binary prefixes using SI symbolsThese prefixes are in common use for file and memory sizes Each successive prefix is multiplied by 1024 (210) rather than the 1000 (103) used by the SI prefix system. Binary prefixes are often written and pronounced identically to the SI prefixes, despite the resulting ambiguity.
The Quiz Show Question that Stumped Bill Gates Q: Exactly how many bits are in a MegaByte? Caveat: MegaByte can either be a synonym for MebiByte, or refer to 106 = 1,000,000 Bytes A: ???
Large number namesWhy American Billionaires Get No Respect in Europe..
Binary numbers.. For a binary code of length n: • there exist 2n patterns • represent 2n distinct numbers, 0 .. 2n-1
A Binary Conestoga Code Ox Driver Commands: • Git! • Whoa! • Gee! • Haw! What is the minimum numbers of bits to encode these 4 commands in binary?
Enhanced Conestoga Code Ox Driver Commands: • Git! • Whoa! • Gee! • Haw! • Back! What is the minimum numbers of bits to encode these 5 commands in binary?
Next: PI Hour Year 1/19/2038!Atomic vs. Optical ClocksWhite Dwarf ChronometersBelt-drives, Slot-Machines, Jump Hour
Next: Jeff Asks About ASCII.. http://www.asciitable.com/ codes:decimal octal hexadecimal