0

My computer uses ASCII, American Standard Code for Information Exchange. It is my understanding that this uses a 7 bit code to represent all the letters, symbols, and numbers needed for the english language.

It is my understanding that these 7 bits can be represented with hexadecimal codes. I thought that hexadecimal needed 8 bits. 4 bits per number.

Can some one explain to me how the hexadecimal system can be used to represent the codes in the 7 bit ASCII system.

Thanks in advance.

3 Answers 3

0

Hexadecimal numbers don't need eight bits, each hex digit can represent four bits but there's no upper limit, since you can just use more digits:

0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff...

For representing seven-bit values, you can just use the lower half of the eight-bit hex numbers, 0x00 through 0x7f.

That gives you the binary numbers 0000000 through 1111111.

Sign up to request clarification or add additional context in comments.

Comments

0

With 7 bits you can represent every number from 0 to 2^7 = 127 (decimal) = 7f (hexadecimal).

Hexadecimal doesn't need 7 bits, it is just another way to write numbers.

Comments

0

You can combine any combination of up to 4 bits into one hexadecimal character.

1 bit:  0 to 1
2 bits: 0 to 3 
3 bits: 0 to 7
4 bits: 0 to F

For 7 bits you need 2 hex digit, one coding 3 bits and the other 4 bits so you get a code of 00 to 7F.

Or you use 8 bits, but the most significant bit is always 0.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.