Computers_Binary

include component="page" page="menu-computers" editable="1" toc

What's a Bit?

 * Computers store information in BITS
 * A “BIT” is a “Binary Digit” – the smallest piece of information you can use to store “messages” or assign meaning to. It has one of two possible values: 0 or 1… ON or OFF… TRUE or FALSE… YES or NO
 * By grouping “BITS” together, we can assign a wider range of meanings. We develop a “CODE” or table of values.

A 1BIT system can have a total of 2 possible messages 0 or 1

Combining Bits
A 2BIT system can have a total of 4 possible messages 00 01 10 11

A 3BIT system can have a total of 8 possible messages 000 001 010 011 100 101 110 111

The number of possible values in a binary system is expressed as 2^n where n is the number of BITS used in the system 2^1 = 2 2^2 = 4 2^3 = 8 2^4 = 16 2^5 = 32 2^6 = 64 2^7 = 128 ** 2^8 = 256 **  (ie. 01000001) 2^9 = 512 2^10=1024

Reading Binary
Binary is a "Base2" system that has only two possible digits (0 and 1) We're used to counting in a "Base10" system where we have ten possible digits (01234567689)

The trick to reading a binary number is understanding what each column represents. The rightmost column is the "1's" column The next one is the "2's" column, then the "4's", "8's", "16's" and so on

To read binary, just observe the value in each column, and adding them together. ||  ||> **128's** ||> **64's** ||> **32's** ||> **16's** ||> **8's** ||> **4's** ||> **2's** ||> **1's** ||>  ||> **Decimal** || For instance, the binary number 1010 has one value in the "8's" column, and one value in the "2's" column. 8 + 2 = 10 - the decimal value of 1010 is ten!
 * > **Binary number**
 * > 00 ||  ||>   ||>   ||>   ||>   ||>   ||>   ||>   ||>   ||>   ||> 0 ||
 * > 01 ||  ||>   ||>   ||>   ||>   ||>   ||>   ||>   ||> 1 ||>   ||> 1 ||
 * > 10 ||  ||>   ||>   ||>   ||>   ||>   ||>   ||> 1 ||>   ||>   ||> 2 ||
 * > 11 ||  ||>   ||>   ||>   ||>   ||>   ||>   ||> 1 ||> 1 ||>   ||> 3 ||
 * > 100 ||  ||>   ||>   ||>   ||>   ||>   ||> 1 ||>   ||>   ||>   ||> 4 ||
 * > 101 ||  ||>   ||>   ||>   ||>   ||>   ||> 1 ||>   ||> 1 ||>   ||> 5 ||
 * > 110 ||  ||>   ||>   ||>   ||>   ||>   ||> 1 ||> 1 ||>   ||>   ||> 6 ||
 * > 111 ||  ||>   ||>   ||>   ||>   ||>   ||> 1 ||> 1 ||> 1 ||>   ||> 7 ||
 * > 1000 ||  ||>   ||>   ||>   ||>   ||> 1 ||>   ||>   ||>   ||>   ||> 8 ||
 * > 1001 ||  ||>   ||>   ||>   ||>   ||> 1 ||>   ||>   ||> 1 ||>   ||> 9 ||
 * > 1010 ||  ||>   ||>   ||>   ||>   ||> 1 ||>   ||> 1 ||>   ||>   ||> 10 ||

8Bits = 1Byte
1 bytes = about 1 character of information on your keyboard.

Take a look at all the characters on your keyboard - These are referred to as **ALPHANUMERIC characters** How many characters do you have on your keyboard?

The “American Standard Code for Information Interchange” is a STANDARD for converting BITS into more conventional ALPHANUMERIC TEXT

the “ASCII Table”
This table assigned a NUMBER to represent each alphanumeric character on a typical keyboard. The letter A was given the number 65

Originally, the ASCII system used only 7Bits for a total of 128 possible values

BUT to handle foreign characters, accents etc. the EXTENDED ASCII system added just one more bit to DOUBLE the number of characters available: The modern ASCII code uses this extended 8BIT system - long strings of zeroes and ones are grouped into clusters of 8bits
 * EXTENDED (8BIT) ASCII System**

ie. 01001010010001010100011001000110 is really

01001010 01000101 01000110 01000110

This is actually a four letter word, in binary format. To convert it back to text, you need to figure out what number each byte translates to, and then use the ASCII chart to look up the corresponding letter.

To read binary, just observe the value in each column, and adding them together. **  ||>  <span style="color: rgb(0, 0, 0);"> ||> <span style="color: rgb(41, 98, 142);">**<span style="color: rgb(27, 95, 192);">128's ** <span style="color: rgb(0, 0, 0);"> ||> <span style="color: rgb(41, 98, 142);">**<span style="color: rgb(27, 95, 192);">64's ** <span style="color: rgb(0, 0, 0);"> ||> <span style="color: rgb(41, 98, 142);">**<span style="color: rgb(27, 95, 192);">32's ** <span style="color: rgb(0, 0, 0);"> ||> <span style="color: rgb(41, 98, 142);">**<span style="color: rgb(27, 95, 192);">16's ** <span style="color: rgb(0, 0, 0);"> ||> <span style="color: rgb(41, 98, 142);">**<span style="color: rgb(27, 95, 192);">8's ** <span style="color: rgb(0, 0, 0);"> ||> <span style="color: rgb(41, 98, 142);">**<span style="color: rgb(27, 95, 192);">4's ** <span style="color: rgb(0, 0, 0);"> ||> <span style="color: rgb(41, 98, 142);">**<span style="color: rgb(27, 95, 192);">2's ** <span style="color: rgb(0, 0, 0);"> ||> <span style="color: rgb(41, 98, 142);">**<span style="color: rgb(27, 95, 192);">1's ** <span style="color: rgb(0, 0, 0);"> ||> <span style="color: rgb(27, 95, 192);"> <span style="color: rgb(41, 98, 142);"> <span style="color: rgb(0, 0, 0);"> ||> <span style="color: rgb(41, 98, 142);">**<span style="color: rgb(27, 95, 192);">Decimal ** <span style="color: rgb(0, 0, 0);"> ||> <span style="color: rgb(41, 98, 142);">**ASCII**
 * > <span style="color: rgb(41, 98, 142);">**<span style="color: rgb(27, 95, 192);">Binary number

<span style="color: rgb(0, 0, 0);"> ||
 * > 01001010 ||  ||> 0 ||> 1 ||> 0 ||> 0 ||> 1 ||> 0 ||> 1 ||> 0 ||>   ||> 64+8+2=**74** || **J** ||
 * > 01000101 ||  ||>   ||> 1 ||>   ||>   ||>   ||> 1 ||>   ||> 1 ||>   ||> 64+4+1=**69** || **E** ||
 * > 01000110 ||  ||>   ||> 1 ||>   ||>   ||>   ||> 1 ||> 1 ||>   ||>   ||> 64+4+2=**70** || **F** ||
 * > 01000110 ||  ||>   ||> 1 ||>   ||>   ||>   ||> 1 ||> 1 ||>   ||>   ||> 64+4+2=**70** || **F** ||

Test yourself: 010011010110001101000011011100100110000101100101
 * What message is this?**

Binary Challenge
Take the BINARY CHALLENGE: Convert these strings of bits into their original text messages