TUCoPS :: PC Hacks :: binary.txt

Binary Counting

     _|_|_|  _|        _|     _| _|     _|  _|     _|    _|_|_|   _|      _|_|_|
     _|      _|      _|  _|  _| _| _|  _| _| _|  _|  _|  _|   _|  _|      _|
     _|_|    _|      _|_|_|  _|    _|  _|    _|  _|_|_|  _|_|_|   _|      _|_|
     _|      _|      _|  _|  _|    _|  _|    _|  _|  _|  _|   _|  _|      _|
     _|      _|_|_|  _|  _|  _|    _|  _|    _|  _|  _|  _|_|_|   _|_|_|  _|_|_|


                  _|_|_|   _|  _|  _|_|_|  _|_|_|  _|_|_|  _|_|_|
                  _|   _|  _|  _|  _|      _|      _|      _|
                  _|_|_|   _|_|_|  _|_|    _|      _|_|    _|_|_|
                  _|       _|  _|  _|      _|      _|          _|
                  _|       _|  _|  _|_|_|  _|_|_|  _|_|_|  _|_|_|


			   http://www.pheces.org
       	                  "Can ya taste the waste?"


öööööööööööööööööööööööööööööööö

Title:      |||| Binary Counting ||||

Date:       February 19, 1998
Author:     rootwurm

öööööööööööööööööööööööööööööööö

binary is base 2.  two numbers.  0 and 1.  that's it.  computers ONLY UNDERSTAND BINARY.  we 
humans (since we designed them)  made it so that computers change binary numbers into stuff
we can understand.  but, computers aren't the only things that can do it.

binary numbers consist of 8 (or more) bits.  a byte is eight bits.  a bit can either be on or off
(1 = on, 0 = off)

	00110011
that's 8 bits, or one byte.

0000-0000  <<<< one byte

HGFE-DCBA  <<<< used to indicate the columns, the letters have no value

all numbers are read from right to left.  the first column (A) is always equal to 1.
the second column (B) is always equal to the base.  since it's binary, then B = 2
the next column over is equal to the BASE x PREVIOUS COLUMN.


now, this may be a bit confusing, but it's actually quiet simple.

HGFE-DCBA (letters mean nothing! just for demonstration purposes!)

A = 1 (always)
B = BASE (in this case, 2)
C = BASE x PREVIOUS COLUMN (previous column will be B, so it's 2(the base) x 2(previous column) 
				therefore, C = 4)
D = BASE x PREVIOUS COLUMN (same thing, 2 x 4 = 8 (2 is base, 4 is previous column))
E = BASE x PREVIOUS COLUMN ( 2 x 8 = 16)
F = BASE x PREVIOUS COLUMN ( 2 x 16 = 32)
G = BASE x PREVIOUS COLUMN ( 2 x 32 = 64)
H = BASE x PREVIOUS COLUMN ( 2 x 64 = 128)


(128)(64)(32)(16)-(8)(4)(2)(1)

^^ That's the place values for the columns in binary.


now you have the value for each column.  here comes the easy part.

just multiply the number that is in the column, by the value of that column.  for instance,

	HGFE-DCBA
	0000-0010 = 2

this is because the B column is equal to 2, and 2 x 1 = 2


let's try another:

	HGFE-DCBA
	0001-0101 = 21

the A column = 1, so 1 x 1 = 1
the C column = 4, so 4 x 1 = 4
the E column = 16, so 16 x 1 = 16

16 + 4 + 1 = 21



that's it!  here's a few numbers in binary to help you practice.  see if you can complete the
sequence.

0000-0001 = 1
0000-0010 = 2
0000-0011 = 3
0000-0100 = 4
0000-0101 = 5
0000-0110 = 6
0000-0111 = 7
0000-1000 = 8
0000-1001 = 9
0000-1010 = 10
...
0100-0101 = 69


later,


rootwurm (rootwurm@pheces.org)

(((((((((((((((((((((((((((((((((((((((((((((#yep)))))))))))))))))))))))))))))))))))))))))))))

TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2024 AOH