140 likes | 162 Views
Learn about the binary numbering system and its use in computing. Understand how bits and bytes work, special binary values, and practice with a binary blitz contest game.
E N D
Chabot College ELEC 99.05 Binary Introduction
Binary and Computing • To make it easier to work with a computer’s states of “on” and “off,” we use a numbering system that only has two possible values. • This numbering system is called “base 2,” or “binary.”
Binary Numbering System In the binary numbering system, each digit has two possible values: 0 or 1
One Bit Therefore, with 1 digit or “bit”, we can have two possible combinations: 1 bit: 21 = 2 values 0 1
Two Bits With 2 digits or “bits”, we can have four possible combinations: 2 bits: 22 = 4 values 0 0 0 1 1 0 1 1
Three Bits 3 bits: 23 = 8 possible values : 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1
1 - 8 Bits 1 bit: 21 = 2 possible values 2 bits: 22 = 4 possible values 3 bits: 23 = 8 possible values 4 bits: 24 = 16 possible values 5 bits: 25 = ? 6 bits: 26 = ? 7 bits: 27 = ? 8 bits: 28 = ?
Binary Numbering System Each value is a binary digit, or bit for short. 01111000 Eight bits together make a unit called a byte. In IP addresses, bytes are called octets (group of eight).
Not exactly… • Eight bits together make a unit called a byte, BUT… • Seven bits grouped together are also, sometimes, referred to as a byte. Example: 7-bit ASCII characters. • “Octet” is used to be unambiguous.
Special Binary Values Bits Values Use/Signpost 4 24 = 16 Hex numbers (0 - F) 7 27 = 128 ASCII characters 8 (byte) 28 = 256 “octet”, extended ASCII 10 210 = 1,024 “K”, “kilo” thousand 16 (2 bytes) 216 = 65,536 64“K” 20 220 = 1,024K “meg” (210 x210) million 24 (3 bytes) 224 = 16,384K “16 megs”(24 x 210 x210) 30 230 “gig”(210 x 210 x210) billion
Binary Numbering System In decimal, each place value is a power of ten. We read the number 2342 as two-thousand three-hundred forty-two. 103 102 101 100 1000 100 10 1 2 3 4 2
Binary Numbering System In binary, each place value is a power of two. The byte 11001111 is equivalent to 207 in decimal. 27 26 25 24 23 22 21 20 128 64 32 16 8 4 2 1 1 1 0 0 1 1 1 1
Practice Slide 27 26 25 24 23 22 21 20 128 64 32 16 8 4 2 1 ? ? ? ? ? ? ? ?
Binary Blitz Contest Gameplay: You are blue and the computer is red. Click START. A random target number from 1 to 255 will be displayed at the right. Use the mouse to toggle the blue zeros and ones until they are the binary equivalent of the decimal number target. Show your screen to the instructor for bonus credit when your score = 10. Double credit for score > 20. Get Binary Blitz free at http://ganns.com