Page 1 of 1

Reading and Writing Binary Numbers and Letters Learn how to read and write in binary!

#1 gbertoli3  Icon User is offline

  • DIC at Heart + Code
  • member icon

Reputation: 40
  • View blog
  • Posts: 1,162
  • Joined: 23-June 08

Posted 06 September 2009 - 04:48 PM

For a while now I have wanted to learn how to read and write binary. I found out that it is pretty easy, once you memorize everything. But for those of you who don't know how to read or write binary, I will show you how. I will be discussing how to read and write binary numbers and letters. First I will start with binary numbers, because well its the easiest(in my opinion) to learn; then after I will go into binary letters. Ok here we go...

Binary Numbers:
First of all when you see a [binary] number like: 01000001 it does not mean that the number is one million and one; That would be WAY OFF! That number is actually the number '65'. Ok let me explain... Below is a basic table on how to read / write a binary number.
------------------------------------------------------------------------------------------------------
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1
---------------------------------


It may not look like much, but it is very useful. Say we have the number 65 and we want to put it into binary; basically all we do is check if the number goes into the scale. Here's how it works. Does 65 go into 128? No, so we put a 0. Does 65 go into 64? Yes, so we put a 1. Now that we have a 1 on the scale we need to subtract the column number from our original number. Take 65 and subtract 64, we have 1 left over. Does 32 go into 1? No, so put a 0. Does 1 go into 16? No, put a 0. Does 1 go into 8? No, put a 0. Does 1 go into 4? No, put a 0. Does 1 go into 2? No, put a 0. Does 1 go into 1? Yes, put a 1. Very simple! If you did the number 65 then this is what your table should look like:
------------------------------------------------------------
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1
---------------------------------
0 | 1 | 0 | 0 | 0 | 0 | 0 | 1

Now if your number gets bigger than 255(128+64+32+16+8+4+2+1) then all you do is add another column on the left. What number do we add??? Very simple, you just double the number to the right of it. So it would be 256. Now our table would look like this:
-----------------------------------------------------------------------------------------------
256 128 64 32 16 8 4 2 1
----------------------------------

Binary Letters:
Ok now that you know how to read and write binary numbers I am going to show you how to do the same, but with letters. There is actually more than one way to do this; I will show you how to do this 2 ways. The first way will to be to memorize all of the Upper & Lower cases of the alphabet. The second way will show you how to do it with the table we made for the numbers. Ok lets begin... Below I have included a list of all Upper & Lower case letters in their binary form and their regular form.


UPPERCASE ||| lowercase
---------------|---------------
01000001 = A | 01100001 = a
01000010 = B | 01100010 = b
01000011 = C | 01100011 = c
01000100 = D | 01100100 = d
01000101 = E | 01100101 = e
01000110 = F | 01100110 = f
01000111 = G | 01100111 = g
01001000 = H | 01101000 = h
01001001 = I | 01101001 = i
01001010 = J | 01101010 = j
01001011 = K | 01101011 = k
01001100 = L | 01101100 = l
01001101 = M | 01101101 = m
01001110 = N | 01101110 = n
01001111 = O | 01101111 = o
01010000 = P | 01110000 = p
01010001 = Q | 01110001 = q
01010010 = R | 01110010 = r
01010011 = S | 01110011 = s
01010100 = T | 01110100 = t
01010101 = U | 01110101 = u
01010110 = V | 01110110 = v
01010111 = W | 01110111 = w
01011000 = X | 01111000 = x
01011001 = Y | 01111001 = y
01011010 = Z | 01111010 = z

As you can see there is a table of the alphabet(Upper and Lower case) and in its binary form as well. The first method I mentioned is to just memorize all of the binary values. If you want to do that, then I have a few tricks for you. If you look at all of the Upper case letters you will see that their binary forms all start with 010; and if you look at all of the lower case letters you will see that their binary form all start with 011. That is only the first trick, the second one is knowing when to alternate between 0's and 1's. If you look in the far right column of either Upper or Lower case; you will see that it starts with a 1, then as you go down it alternates between 1 and 0 every other time. In the column to the left of that, they alternate every two numbers(except the 1st one); so it will go 0,11,00,11,00,etc. Then the next column alternates every 3 numbers: 000,111,000,111,etc. Then it moves to alternating every 7 numbers, then after that every 15 numbers. Now that we are done with some tricks I can move on to the second method. This method will use the number scale/table we used when calculating the binary form of numbers. First thing you need to do is go to AsciiTable.com. What we are going to do is get the Decimal Version(left column) of the character. Once we have our decimal number we are going to put it into the scale we used for writing binary numbers. Lets take the letter A for example and put it into our table. The decimal version of A is 65. Does 65 go into 128? No, put 0. Does 65 go into 64? Yes, put 1. Sound Familiar? If not just refer back to the Binary Numbers section.
------------------------------
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1
---------------------------------
0 | 1 | 0 | 0 | 0 | 0 | 0 | 1


If you have any more tips or tricks, please share; I'm sure other people would like to know. I hope you enjoyed this tutorial!

Is This A Good Question/Topic? 0
  • +

Replies To: Reading and Writing Binary Numbers and Letters

#2 Jaakuuta  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 163
  • Joined: 02-July 09

Posted 09 September 2009 - 03:40 AM

Seems pretty good...
a few suggestions...

Binary -> hexadecimal represents 4 bits
0000 0000 => 00
0000 0001 => 01
0000 0010 => 02
0000 0011 => 03
0000 0100 => 04
0000 0101 => 05
0000 0110 => 06
0000 0111 => 07
0000 1000 => 08
0000 1001 => 09
0000 1010 => 0A
0000 1011 => 0B
0000 1100 => 0C
0000 1101 => 0D
0000 1110 => 0E
0000 1111 => 0F
1010 0101 => A5
1101 1011 => DB
1110 1001 => E9
et cetera

also, to remember the values of the digits, just remember binary means base 2, in other words it goes
2^7 | 2^6 | 2^5 | 2^4 | 2^3 | 2^2 | 2^1 | 2^0
or
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1