Follow us on Twitter!
Become the change you seek in the world. - Gandhi
Saturday, April 19, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 29
Guests Online: 28
Members Online: 1

Registered Members: 82838
Newest Member: w1zarrd
Latest Articles
View Thread

HellBound Hackers | Computer General | Cryptography

Author

Binary questions


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 27-09-06 19:32
It seems to have taken the ASCII-value of 5 which is 53.
Author

RE: Binary questions


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 27-09-06 19:40
It seems to have taken the ASCII-value of 5 which is 53.
Author

RE: Binary questions


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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.)