How did ASCII assign letters a specific number? How did that system came to be? How did early computers adapt to it?

299 views

For example: how was the letter A given the binary code of “01000001”? (I really don’t know anything about this but I’m interested)

In: 12

8 Answers

Anonymous 0 Comments

> For example: how was the letter A given the binary code of “01000001”

There’s actually a lot of thought that went into making ‘A’ =(0)1000001.

So to start off, you need 5 bits to represent the alphabet. 5 bits gives us 32 possible combinations. We don’t need 32, but 4 bits gives us 16, which is not enough. We need more than 16, so we get 32.

The next step is surprisingly intuitive. in this 5-bit set, A becomes 00001 because it’s the first letter of the alphabet. B becomes 00010 because it’s the second, etc.

Next we’ll build up another 5-bit set. Why? We’ve assigned A-Z, next we want to assign a-z.

‘a’ is still the first letter of the alphabet, so in this second set, we’ll assign a=1, b=2, etc.

The last one I’ll hit on is digits. We’re going to need us some digits. There’s only 10 digits, so we can do this in a 4-bit set, 0000-1111. 0=0000, 1=0001, etc because, well, 0001=1, it totally makes sense.

But because we’re building this system out of 5-bit sets, we’ll drop that 4 bit set inside a 5-bit set, it’ll be fine.

In its original 7-bit form, you can read it as two bits for ‘set’, and 5 bits for value. Essentially there’s a control set, a characters (and digits) set, an upper-case set, and a lower-case set.

(Plus a whole bunch of things that are stuffed in the gaps, because 26 letters doesn’t need 32 positions, and we really couldn’t afford to waste any)

10 00001 = ‘A’, the first letter in the 2nd set.
11 00001 = ‘a’, the first letter in the 3rd set.

This kinda thing was really important back in the day, because computers didn’t have a lot of grunt to them at all – so it allowed a lot of shortcuts. You can convert text to upper-case by just unsetting the first bit, you don’t need to go through and say “if a, then A, if b, then B”. Similarly, you can convert the text “101” to the digits 1,0,1 by just unsetting the first three bits.

So for the specific example of why A is 01000001, it’s because A is the first letter of the alphabet, and (0)10 is the upper-case set.

You are viewing 1 out of 8 answers, click here to view all answers.