General Question

Walodchy's avatar

In the international standard ASCII encoding, each character needs 7 bits of storage; however, in an ASCII string one byte (8 bits) is usually used for each character. Explain why this is done?

Asked by Walodchy (7points) July 23rd, 2015

To explain it, I understand that char needs 7bits and string needs 8bits, but I don’t know how to explain why. Thanks.

Observing members: 0 Composing members: 0

10 Answers

LostInParadise's avatar

Welcome to Fluther. I don’t want to do your homework for you, but I will get you started. The extra bit is called a parity bit. If you don’t know what that means, you can do some Web searching to learn more. If you are still stuck, I can explain further.

Walodchy's avatar

Hi, this is not homework, this is from past exams. I am trying to answer all questions from past exams.

Response moderated (Unhelpful)
Response moderated (Flame-Bait)
Response moderated (Unhelpful)
Response moderated
LostInParadise's avatar

Like I said, the eighth bit is a parity bit. Parity bits provide a simple method for detecting transmission errors of the data. There are two types of parity that are used, even and odd.
If you are using even parity, the sum of all the bits, including the parity bit, is always even. If you are using even parity and the sum of the 8 character bits is odd, then you know that there must have been an error is transmission.

For even parity, If you have a value of 1100001, a parity bit of one is added to the beginning to get 11100001. If odd parity is used, the leading bit is 0.

I hope that helps. Sorry for assuming this was for homework. We have a policy of not doing homework for students.

Walodchy's avatar

Big thanks LostInParadise!

sahID's avatar

@Walodchy Welcome to Fluther.

@LostInParadise Follow-up question: That description of the 8th bit use works for the basic set of 127 ASCII character codes. However, ASCII includes 128 additional special character codes (giving a total of 255), all of which require the use of all 8 bits in a byte. So how do odd & even parity work with these extended characters?

ARE_you_kidding_me's avatar

8 bits is a byte. This is done for practical reasons… computers store and read data in bytes. it also enabled the extended set. That’s the basic answer but as others have pointed out there are other uses for that bit depending on which standard. In computing nothing gets wasted if it can be made useful.

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther