Write Capital and Lowercase Letters in Binary

Since computers process all data as numbers, every symbol–including letters–must be represented by a number.[1] And since an uppercase “A” and a lowercase “a” are technically two separate symbols, each must be converted into a unique eight-digit binary number composed exclusively of 1’s and 0’s for a computer to interpret it.[2] Although the process for coding letters into binary numbers may seem labor-intensive at first, it becomes second-nature with practice; in the meantime, hum the James Bond or Mission: Impossible theme to yourself as you dive into the world of coding.

Steps

Converting Uppercase Letters into Binary

  1. Consult an ASCII conversion chart. Before you convert a letter into binary, you first need to know its numerical representation in the ASCII (or American Standard Conversion for Information Interchange) chart. The ASCII assigns numerical representations to a variety of generic symbols, including letters. These numerical representations start at 0 and end with 225. Search for a given letter (let’s say “A”) in the “Character” column, which may be abbreviated to “CHR.” That letter’s numerical representation is listed in the “Decimal Value," or “DEC,” column. Consulting an ASCII chart is the easiest way to determine a letter’s decimal value.[1]
    • To determine an uppercase letter’s decimal value without an ASCII chart, remember the number 65. Write out the entire alphabet in uppercase. Then assign the number 65 to the letter “A.” From there, assign each subsequent letter with each subsequent number (B = 66, C = 67, etc), ending with Z = 90. Now you have the decimal value for each uppercase letter according to the ASCII chart.
  2. Grab some paper to prepare a worksheet. Create three columns. Label one “Binary Digits,” label the second “Default Value,” and label the third “Calculated Value.” Since binary numbers include eight digits, create eight rows across all three columns. Next, in all eight rows, write the multiplication sign in between Column 1 and Column 2, and then do the same with the "equals" sign in between Column 2 and Column 3, so that Column 1 x Column 2 = Column 3 across the board.[2]
  3. Fill in Column 2. From top to bottom, list the following numbers under "Default Value:" 128; 64; 32; 16; 8; 4; 2; 1. If you read the default values from top to bottom, notice how each number is half that of the preceding value (64 is half of 128; 32 is half of 64; etc). Also note that, if you add the numbers in Column 2 together, you’ll find they equal 225: the highest decimal value assigned in the ASCII chart.[2]
  4. Write your letter’s decimal value below Column 3. Let’s say you’re converting the letter “A,” whose decimal value is 65. Be sure to write “65” all the way down at the bottom, so that each of the eight rows in Column 3 remains empty. Although Column 3 is blank right now, the values that will appear here momentarily will soon add up 65.[2]
    • To convert a letter into binary numbers, you’re essentially doing a math equation in reverse. The decimal value for that letter is the “final” answer,” or your starting point. From here, you’re going to work backwards to determine that letter’s binary number in Column 1.
    • To better understand how to do this, let’s do the opposite and convert the binary number “01011010” into a letter to see how this table works. From top to bottom, fill in Column 1 with these numbers: 0 - 1 - 0 - 1 - 1- 0 - 1 - 0. Now multiply each number in Column 1 with the corresponding number in Column 2: 0 x 128 = 0; 1 x 64 = 1; 0 x 32 = 0; etc. Write the answer to each in Column 3 and then add them all up: 0 + 64 + 0 + 16 + 8 + 0 + 2 + 0 = 90. Consult the ASCII chart, and you’ll find that a decimal value of 90 represents the letter “Z.”
    • Now that you’ve converted a binary number into a letter, working your way backwards through the table to do the opposite should be less daunting. The fact that binary numbers are always either “1” or “0” makes the math easy. Each of the calculated values in Column 3 will always be either “0” or one of the default values that you’ve already written down in Column 2.
  5. Do the math in Column 2. Figure out which combination of the default values in Column 2 will add up to your letter's decimal value. For the letter "A," whose decimal value is 65, look at the numbers you've already written down in Column 2 and see which add up to 65. Reading Column 2 from top to bottom, you’ll find the second number down is “64,” and the eighth number is “1.” Add these together and you have 65.[2]
  6. Copy those numbers into Column 3. Write in “0” for the other rows. So, for the letter “A,” Column 3 should read from top to bottom: 0 - 64 - 0 - 0 - 0 - 0 - 0 - 1.[2]
  7. Fill in Column 1. Using either “1” or “0,” enter the appropriate binary digit for each row. Remember: Column 1 x Column 2 = Column 3. If Column 3 is 0, enter “0” in Column 1. If Column 3 is the same number as Column 2, enter “1.” For instance, with the letter “A:” 0 x 128 = 0; 1 x 64 = 64, 0 x 32 = 0; etc. When read from top to bottom, Column 1 will now give you the binary number for that letter, so the binary number for “A” is 0 - 1 - 0 - 0 - 0 - 0 - 0 - 1.[2]

Converting Lowercase Numbers into Binary

  1. Consult an ASCII conversion chart to find a lowercase letter’s unique decimal value. Remember, since each lowercase letter is its own symbol, each one has its own decimal value, as well. Refer to an ASCII chart and you’ll find that, while an uppercase “A” has a decimal value of 65, a lowercase “a” has a decimal value of 97.
    • To determine a lowercase letter’s decimal value without an ASCII chart, remember the number 97. Write down the alphabet in lowercase. Assign the number 97 to letter “a.” Then assign each subsequent letter with each subsequent number (b = 98, c = 99, etc), ending with z = 122. Now you have the decimal value for each lowercase letter according to the ASCII chart.[1]
  2. Grab some paper to prepare a worksheet. Create three columns. Label one “Binary Digits,” label the second “Default Value,” and label the third “Calculated Value.” Since binary numbers include eight digits, create eight rows across all three columns. Next, in all eight rows, write the multiplication sign in between Column 1 and Column 2, and then do the same with the "equals" sign in between Column 2 and Column 3, so that Column 1 x Column 2 = Column 3 across the board.[2]
  3. Fill in Column 2. From top to bottom, list the following numbers under "Default Value:" 128; 64; 32; 16; 8; 4; 2; 1. If you read the default values from top to bottom, notice how each number is half that of the preceding value (64 is half of 128; 32 is half of 64; etc). Also note that, if you add the numbers in Column 2 together, you’ll find they equal 225: the highest decimal value assigned in the ASCII chart.[2]
  4. Write your letter’s decimal value below Column 3. Let’s say you’re converting the letter “a,” whose decimal value is 97. Be sure to write “97” all the way down at the bottom, so that each of the eight rows in Column 3 remains empty. Although Column 3 is blank right now, the values that will appear here momentarily will soon add up 97.[2]
    • To convert a letter into binary numbers, you’re essentially doing a math equation in reverse. The decimal value for that letter is the “final” answer,” or your starting point. From here, you’re going to work backwards to determine that letter’s binary number in Column 1.
    • To better understand how to do this, let’s do the opposite and convert the binary number “01111010” into a letter to see how this table works. From top to bottom, fill in Column 1 with these numbers: 0 - 1 - 1 - 1 - 1- 0 - 1 - 0. Now multiply each number in Column 1 with the corresponding number in Column 2: 0 x 128 = 0; 1 x 64 = 1; 1 x 32 = 32; etc. Write the answer to each in Column 3 and then add them all up: 0 + 64 + 32 + 16 + 8 + 0 + 2 + 0 = 122. Consult the ASCII chart, and you’ll find that a decimal value of 122 represents the letter “z.”
    • Now that you’ve converted a binary number into a letter, working your way backwards through the table to do the opposite should be less daunting. The fact that binary numbers are always either “1” or “0” makes the math easy. Each of the calculated values in Column 3 will always be either “0” or one of the default values that you’ve already written down in Column 2.
  5. Do the math in Column 2. Figure out which combination of the default values in Column 2 will add up to your letter's decimal value. For the letter "a," whose decimal value is 97, look at the numbers you've already written down in Column 2 and see which add up to 97. Reading Column 2 from top to bottom, you’ll find the second number down is “64,” the third one down is "32," and the eighth number is “1.” Add these together and you have 97.[2]
  6. Copy those numbers into Column 3. Write in “0” for the other rows. So, for the letter “a,” Column 3 should read from top to bottom: 0 - 64 - 32 - 0 - 0 - 0 - 0 - 1.[2]
  7. Fill in Column 1. Using either “1” or “0,” enter the appropriate binary digit for each row. Remember: Column 1 x Column 2 = Column 3. If Column 3 is 0, enter “0” in Column 1. If Column 3 is the same number as Column 2, enter “1.” For instance, with the letter “a:” 0 x 128 = 0; 1 x 64 = 64, 1 x 32 = 32; etc. When read from top to bottom, Column 1 will now give you the binary number for that letter, so the binary number for “a” is 0 - 1 - 1 - 0 - 0 - 0 - 0 - 1.[2]

Tips

  • Do the opposite to read binary.
  • Go green. Open a spreadsheet on your computer to create conversion worksheets.

Related Articles

Sources and Citations