Binary Question

ManBearPig

Diamond Member
Sep 5, 2000
9,173
6
81
So binary starts as:

1,2,4,8,16,32

It double right? And it starts with one? So 8 would be 1000....and 7 would be 111?

also, can you use binary to show digital images? like could i use binary for each pixel or whatever?

thanks...just wondering
 

txrandom

Diamond Member
Aug 15, 2004
3,773
0
71
What do you mean 8 would be 1000 and 7 would be 111?

This is Binary-

0 = 0
1 = 1
10 = 2
11 = 3
11111111 = 255
 

DanFungus

Diamond Member
Jul 27, 2001
5,857
0
0
00000001 = 1
00000010 = 2
...
11111111 = 255

Think of the eight binary digits (bits) as:

2^7, 2^6, 2^5, 2^4, 2^3, 2^2, 2^1, 2^0

so if you have 00101001, it is the same as:

0*2^7 + 0*2^6 + 1*2^5 + 0*2^4 + 1*2^3 + 0*2^2 + 0*2^1 + 1*2^0
= 32 + 8 + 1
= 41