binary digits

KoolDrew

Lifer
Jun 30, 2004
10,226
7
81
Just a question but how exactly do they get the values of certain stuff in binary digits? IS it soem sort of pattern or what? Because 1 would be '00110001'. How do you get those numbers anyway?
 

Dru22

Senior member
Sep 14, 2004
229
0
0
Actually 1 wouldn't be 00110001......it would be 00000001. The number you just put would be 49. The numbers are made up of 8 digits. The values of these digits are. 128,64,32,16,8,4,2,1 in that order. So if you had 10010001 you would have 145. Hexadecimal is similar but you would start at 0 and go to 9 then start at "A" and go to "F" so it would all look like this.

Binary
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111

Hexadecimal = Base 16 Each Hexadecimal digit is equal to a "Nibble"

0000 = 0
0001 = 1
0010 = 2
0011 = 3
0100 = 4
0101 = 5
0110 = 6
0111 = 7
1000 = 8
1001 = 9
1010 = A
1011 = B
1100 = C
1101 = D
1110 = E
1111 = F

So 00001111 would = 0F or 11111100 would = FC

I'm in Game & Simulation Development at Shawnee State University...its 1 of only a handful to offer a bachelors degree in this field. They branch off into Game Programmers and Computer Graphics after the first year, but everyone has to take Game Programming 1 & 2.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Originally posted by: Dru22
The numbers are made up of 8 digits.

:confused:

Binary numbers are not 8-digits. They are whatever length they need to be, just like a decimal number is. Binary is just a number system, just like decimal, hex, or any other base that you want. You don't go around writing 0000004 to represent a number in decimal...:confused:

 

Dru22

Senior member
Sep 14, 2004
229
0
0
Yes I do know that. But when using them with the Hexadecimal. The correct way of doing this is using the 8-bit process. Binary works just like decimal except that it uses Base 2 rather than Base 0. 8 switches together is called a byte. You can only store 0 - 255 in 1 byte of memory.
 

Schadenfroh

Elite Member
Mar 8, 2003
38,416
4
0
there are 10 types of people in this world, those who understand binary digits and those who dont
 

hopejr

Senior member
Nov 8, 2004
841
0
0
I find that I'm better at binary arithmetic than decimal for some strange reason (maybe because I use binary and hex much more than decimal these days....)