Bits and Bytes - PowerPoint PPT Presentation

About This Presentation
Title:

Bits and Bytes

Description:

Bytes/Parity How Many bits (or doughnuts ) do we really need? Good question! What symbols/information do we wish to convey? Pieces of Information – PowerPoint PPT presentation

Number of Views:126
Avg rating:3.0/5.0
Slides: 11
Provided by: Peet151
Category:
Tags: bits | bytes

less

Transcript and Presenter's Notes

Title: Bits and Bytes


1
Bits and Bytes
Bytes/Parity
How Many bits (or doughnuts) do we really need?
Good question! What symbols/information do we
wish to convey?
The alphabet (a, , z) 26
The upper case alphabet (A, , Z) 26
2
Bits and Bytes
What about the remaining 34 (128 - 94) bits?
There are a number of additional special
characters and a number of hidden characters
which we didnt account for Carriage Return
(CR) Back Space (BS) End of File (EOF) etc. So
the additional bits will be used.
Are 7 bits normally used to represent a character
set?
Yes. The Standard coding scheme consists of 128
characters
3
Bits and Bytes
But, doesnt a byte represent a character? And
isnt a byte equal to 8 bits, not 7?
Then Why does a byte contain 8-bits?
4
Bits and Bytes
There are a few reasons. Primarily, however, it
is because earlier machines suffered some
reliability problems (remember what the term
debugging really means)1.
1. There were problems with storage and data
transmission
One additional bit was added to help detect
errors
The Parity Bit
How does adding one additional bit help detect
errors?
1 In the days of vacuum, tubes, bugs were
attracted to the heat given off by the tubes.
Programmers frequently spent much of their time
scrapping dead bugs off the circuitry, or
de-bugging.
5
Bits and Bytes
Assume that we wished to send the series of bits
1001100
But, because of transmission errors, actually
sent the message
1001101
How can we tell that an error was made? How do we
know that the sequence 1001101 was not the true
message?
As it stands now, we cant.
6
Bits and Bytes
If we were to send a transmission using an extra
bit
1
1001100
Parity-Bit
We could determine if the message was correctly
transmitted by counting the total number of on
bits
E.G. If the total number of on bits is an EVEN
number, the message was correctly
transmitted.
Since the message sent contains 4 bits (an even
number) the message sent was correct.
7
Bits and Bytes
IF, however, we received the message
We know it is incorrect because the message
contains 5 (an odd number) bits
Other examples using EVEN Parity
Message Sent
No. Bits
Mess. Received
6 (Even)
Correct
3 (Odd)
Incorrect
5 (Odd)
Incorrect
4 (Even)
Correct
8
Bits and Bytes
What gives? The last message
Message Sent
Mess. Received
No. Bits
4 (Even)
Correct
Was NOT correct, even though the total number of
on bits received was even???
Yes - The system is NOT perfect, but if there
are thousands or millions of messages sent, it is
highly unlikely that mistakes will not be caught.
All it takes is one incorrect message.
9
Bits and Bytes
Must Parity always be equal??
No, it can be ODD (or there can be NO parity).
That decision is made by the software designer.
If we look at our previous examples using ODD
parity
Mess. Received
No. Bits
Message Sent
5 (Odd)
Correct
4 (Even)
Incorrect
4 (Even)
Incorrect
5 (Odd)
Correct
Notice that errors can still go undetected.
10
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
Write a Comment
User Comments (0)
About PowerShow.com