Join us at IRC!
Capitalism is an Island of wealth in a sea of poverty
Wednesday, May 23, 2012
Navigation
Members Online
Total Online: 27
Web Spiders: 14
Guests Online: 26
Members Online: 1

Registered Members: 70169
Newest Member: fadzlin
Latest Articles
View Thread

HellBound Hackers | Computer General | Cryptography

Author

Binary questions

vegeta_man111
Member

Posts: 104
Location: Ohio
Joined: 20.07.05
Rank:
Apprentice
Posted on 16-09-06 04:57
ok, I am working on somehting based on binary, and I got a few questions.

1.) i read on somehting that 5 in binary is 101(base 2) but I ran it through a binary prog and it came out as 00110101 and i was wondering why this is.

2.) Why is 0 as binary 00110000? is it just adding the 00110 to the original binary cause i also saw that 0 is just 000(base 2)


Author

RE: Binary questions

xtrmsk8r91
Member



Posts: 157
Location: /root
Joined: 16.10.05
Rank:
Uber Elite
Posted on 16-09-06 05:11
1) you ran it through as a character string instead of an integer. so it (i think??) took the ascii value and converted that to binary, instead of the actual integer 5. 101 would be correct: 1(4) + 0(2) + 1(1) = 5.

2) again, the program accepted it as a character instead of an integer. 0 in binary is just 0.

hope that clears things up. binary can be kinda tricky, just read up on it (google) and you'll start to understand it.


Author

RE: Binary questions

c4p_sl0ck
Member



Posts: 380
Location: Sweden‮‭
Joined: 17.09.06
Rank:
God
Posted on 27-09-06 19:32
It seems to have taken the ASCII-value of 5 which is 53.
c4p_sl0ck@hotmail.com
Author

RE: Binary questions

c4p_sl0ck
Member



Posts: 380
Location: Sweden‮‭
Joined: 17.09.06
Rank:
God
Posted on 27-09-06 19:40
It seems to have taken the ASCII-value of 5 which is 53.
c4p_sl0ck@hotmail.com
Author

RE: Binary questions

Happysmileman
Member

Posts: 347
Location:
Joined: 02.08.06
Rank:
HBH Guru
Posted on 27-09-06 19:41
Basically its the last few numbers you need to look at... For example "A" is 01000001 while "a" is 01100001... The last few digits represent the position in the alphabet eg 1 for a... while the first few numbers are just there to group it... It's not all this easy but that's basically how it works.
Author

RE: Binary questions

Jake
Member

Posts: 107
Location: United States
Joined: 13.12.04
Rank:
God
Posted on 27-09-06 21:07
Also, it gave you "00110101", because the most widely used form of binary is in base 8, which is what computers use. (2^8=256, 256 characters on the ASCII chart). And it converted the ASCII value of 5 to binary, not the number 5.


Author

RE: Binary questions

Zekasu
Member

Posts: 171
Location:
Joined: 31.12.05
Rank:
HBH Guru
Posted on 27-09-06 21:07
As per the numbers, it's probably running it through as an ASCII string, as mentioned earlier.

01000001 - A, int(65)
01100001 - a, int(97)

It's actually quite ingenious as to how the letters are arranged, in respect to electronics and logic circuits. All you have to do is switch a bit to change it from capital to lowercase, in ASCII. (Unicode's just a tad different, if I remember.)
Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.