1 / 11

Bits & Bytes

Off. On. No. Bad. Male. Good. Yes. Dead. Alive. Female. Bits. Bits & Bytes. Bit = B inary Dig it (or Bi nary Digi t ) = {0, 1}. Assume you wish to send a message using a Light Switch A binary condition since the light switch can be either:. OR.

sergiocox
Download Presentation

Bits & Bytes

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. Off On No Bad Male Good Yes Dead Alive Female Bits Bits & Bytes Bit = BinaryDigit(orBinary Digit) = {0, 1} Assume you wish to send a message using a Light Switch A binary condition since the light switch can be either: OR Any binary condition can be represented with a single light switch : OR OR OR OR

  2. #1 #2 #3 #4 Off 0 Off 0 Off 0 On 1 On 1 Off 0 On 1 On 1 But, what if there are more than two states? What if I want to represent the conditions GOOD, SO-SO, and BAD???? Simple ….. Add more Light Switches If there are 2 light switches, the total combinations are: Interpreted as: Bad Interpreted as: So-So Interpreted as: Good Not Used

  3. Bits and Bytes If I can transmit 4 messages with two bits, how many could I transmit if I had 3 bits? Or 4 bits? With 3-bits, there are 8 possible combinations: 000 100 001 101 010 110 011 111 And, with 4-bits, there are 16 possible combinations: 0000 0100 1000 1100 0001 0101 1001 1101 0010 0110 1010 1110 0011 0111 1100 1111

  4. Decimal Number Number Number Places Messages Bits Messages 0 100 = 1 0 20 = 1 1 101 = 10 1 21 = 2 2 102 = 100 2 22 = 4 3 103 = 1,000 3 23 = 8 4 104 = 10,000 4 24 = 16 5 105 = 100,00 5 25 = 32 6 106 = 1,000,000 6 26 = 64 7 107 = 10,000,000 7 27 = 128 8 108 = 100,000,000 8 28 = 256 9 109 = 1,000,000,000 9 29 = 512 10 1010 = 10,000,000,000 10 210 = 1,024 Bits and Bytes Is there any way to know how many messages we could transmit for a given number of bits without having to test all possible combinations?? As in Decimal (base 10), it is possible to determine how many messages can be transmitted for any number of decimal places. In Binary (base 2), the same calculations are made, but using bits (instead of decimals).

  5. Bits and Bytes The General formula is: I = Bn where: I = The amount of Information (messages) available B = The base we are working in (Decimal or Binary) n = The number of digits (decimals or bits) we have Applying the formula to both decimal and binary values: 100 = 1 20 = 1 101 = 10 21 = 2 102 = 100 22 = 4 103 = 1,000 23 = 8 104 = 10,000 24 = 16 105 = 100,000 25 = 32 106 = 1,000,000 26 = 64 107 = 10,000,000 27 = 128 108 = 100,000,000 28 = 256 109 = 1,000,000,000 29 = 512 1010 = 10,000,000,000 210 = 1,024

  6. If I = 10n (decimal) OR I = 2n (binary) then log(I) = n log(10) log(I) = n log(2) log(I) log(I) log(I) log(I) And n = = n = = log(10) 1.000 log(2) 0.30103 = log(I) Since 100.30103 = 2 Information Decimals Needed Bits Needed 10 log(10) = 1.000 log(10)/log(2) = 1.000/.30103 = 3.32 50 log(50) = 1.699 log(50)/log(2) = 1.699/.30103 = 5.64 100 log(100) = 2.000 log(100)/log(2) = 2.000/.30103 = 6.64 500 log(500) = 2.699 log(500)/log(2) = 2.699/.30103 = 8.97 1,000 log(1000) = 3.000 log(1000)/log(2) = 3.000/.30103 = 9.97 10,000 log(10000) = 4.000 log(10000)/log(2) = 4.000/.30103 = 13.29 Bits and Bytes What if I Know how much information (I = Number of Messages) I want to transmit. How do I determine the number of bits I need? Just reverse the process.

  7. The formula given should have been: log(I) log(I) Where: n = = log(2) 0.30103 is the ceiling of the result (i.e., rounded up) And the number of bits needed would be: Messages Bits Needed 10 log(10)/log(2) = 1.000/.30103 = 3.32 = 4 50 log(50)/log(2) = 1.699/.30103 = 5.64 = 6 100 log(100)/log(2) = 2.000/.30103 = 6.64 = 7 500 log(500)/log(2) = 2.699/.30103 = 8.97 = 9 1,000 log(1000)/log(2) = 3.000/.30103 = 9.97 = 10 10,000 log(10000)/log(2) = 4.000/.30103 = 13.29 = 14 Bits and Bytes How can we have partial bits (or decimals)? For example, how can we have 5.64 bits to represent 50 messages? We Can’t

  8. Bits and Bytes Notice that we could have predicted that, for example, it would take 6 bits to represent 50 pieces of information since: 25 = 32 and 26 = 64 If we need 6 bits to represent 50 pieces of information, and we could represent 64 pieces of information, what happens to the remaining 16 pieces of information? They either remain unused, or are available for future use

  9. Bits and Bytes What does this have to do with Computers? If we were to look inside a computer (especially earlier ones) we might see a series of ‘doughnuts’: Which were merely metal rings with wires running through them Depending on whether there was voltage running through them or not (actually, high voltage or low voltage) the series represented a sequence of messages. A BINARY SITUATION!

  10. Where and represent the different voltage states Bits and Bytes Notice that since there are 5 ‘doughnuts’, there are 25 or 32 Combinations

  11. This Concludes The Slides for this Section Choose an Option:  Repeat Slides for this Section  Go To Next Set of Slides For this Chapter  Go To Slide Index For Chapter 1  Go To Slide Index For Chapter 2  Go To Slide Index For Textbook  Go To Home Page

More Related