Bit Patterns – Day 2 Scott Baranick & Daniel Velasquez
Question from Yesterday So what then are the largest numbers that can be represented using 16 bits? 32 bits? and 64 bits? 16 bits = 2 16 – 1 = 65, bits = 2 16 – 1 = 65, bits = 2 32 – 1 = 4,294,967, bits = 2 32 – 1 = 4,294,967, bits = 2 64 – 1 = 1.84 x bits = 2 64 – 1 = 1.84 x 10 19
Binary is Hard to Read Let's face it. Reading a long list of zeros and ones is not easy for mere humans. Let's face it. Reading a long list of zeros and ones is not easy for mere humans. Humans today use a kind of shorthand for binary called hexadecimal (Base 16) Humans today use a kind of shorthand for binary called hexadecimal (Base 16)
How is Hex used within the computers of today? RGB values used in Web page design. RGB values used in Web page design.style="color:#CC246B" MAC or Physical Address of network cards. MAC or Physical Address of network cards.00-C5-DA-5F-C0-E5
Do You Know Your Address? The network interface card has a unique ID called a MAC address. The network interface card has a unique ID called a MAC address. To view this address follow these steps: To view this address follow these steps: 1.Choose "Run" off of the Start menu. 2.Type in "cmd" to get a black command line prompt. 3.Type in "ipconfig /all" 4.The MAC address is the one labelled "Physical Address"
Counting in base 16 Remember to use letters rather than numbers for 10 through 15 Remember to use letters rather than numbers for 10 through 15
"Hex" Digits Fill out the 3 rd column of your number systems worksheet. Fill out the 3 rd column of your number systems worksheet.
Binary to Hex Substitution Binary Hex E5 E5 Substitute a single hexadecimal digit for each set of 4 binary bits. Use the 4-bit pattern to "look up" the hex digit used to replace them from the table on the worksheet.
Binary to Decimal x 2 0 = 1 x one = 1 0 x 2 1 = 0 x two = 0 1 x 2 2 = 1 x four = 4 0 x 2 3 = 0 x eight = 0 0 x 2 4 = 0 x sixteen = 0 1 x 2 5 = 1 x thirty-two = x 2 6 = 1 x sixty-four = 64 1 x 2 7 = 1 x 128 = 128
Hex to Decimal E 5 5 x 16 0 = 5 x one = 5 E x 16 1 = 14 x sixteen =
Tip If you have to convert a binary number into decimal by hand, first convert it to hex and then convert to decimal.
Activity 1 Convert your MAC address to decimal. Convert your MAC address to decimal.
Activity 2 Convert this IP address represented in binary into decimal
Summary Computers are, at their essence, binary machines. Computers are, at their essence, binary machines. Hexadecimal is just a shorthand form of representing binary numbers. Hexadecimal is just a shorthand form of representing binary numbers. Although we humans may use Hex to describe values within a computer, computers do not "think" in Hex or Decimal, but rather, computers "think" in Binary. Although we humans may use Hex to describe values within a computer, computers do not "think" in Hex or Decimal, but rather, computers "think" in Binary.
End Day 2