Binary, Hexadecimal & Decimal Codes
Fun with the Windows Calculator
Representing Numbers
in Binary, Hexadecimal & Decimal Formats. BIT = BInary Digit 1 Byte = 8 Bits 

Open the Windows
calculator. 

Change its view to
Scientific. 

Notice that it opens to a Decimal representation by default. Notice that "Dec" is checked and a symbol set of 10 numerals are shown in blue: 0 1 2 3 4 5 6 7 8 9 

Enter a large decimal number through the keyboard. Decimal numbers are easy for us to understand because we compute with our 10 fingers. Other cultural groups compute with 20 fingers on both hands. 

Select the Binary "Bin" representation to see how this number would be represented with a symbol set of only 2 numerals: 0 1 Notice that those keys are blue. Binary numbers are easy for machines to understand because they can be represented by by an ON/OFF switch, magnetic North/South or a hole vs no hole. For convenience they are grouped 8 binary digits (bits) to the word (byte). 

Select the Hexadecimal "Hex" representation to see how this number would be represented with a symbol set of 16 numerals: 0 1 2 3 4 5 6 7 8 9 A B C D E F Notice that those keys are blue. A byte of 8 bits can be conveniently represented by 2 hexadecimal numerals. They are a compact way to represent a byte. 

How do you count
using different symbol sets? It's relatively simple. You start at the
beginning and move through the set of symbols in sequence. When you get
to the end you start over again, but you add a symbol to the left. 
1 and 0 will always appear in any symbol set of numerals. Try counting with the calculator using each of these three representations to get a feel for how the counting works: 1 + 1 = 
Text in a computer
is represented by 8bit bytes.


The common keys on a typewriter, teletype or computer keyboard are represented in ASCII code. Notice that 1 byte can store 256 decimal numbers. ASCII code only uses 128 symbols. The leftmost bit does not matter; it can be anything. ASCII is the code used in .txt files. 

Many other codes are used in computing. Some are more compact taking up less room in memory, others are more versatile offering different fonts and symbols. This Windows extension of the ASCII code uses close to the full complement of 256 symbols. 

The hexadecimal value of any symbol is given by the number of the row and the number of the column. The "@" sign is hexadecimal "40," usually written 0x40 for clarity. The copyright symbol "©" is hexadecimal 0xA9 in the Windows extension of ASCII. In plain ASCII 0xA9 would be interpreted as 0x29 and rendered as a ")". 
Color in a computer
is represented by three 8bit bytes specifying the amounts of red, green
and blue additive primary colors.

