"Didactic Bytes" the dust...

User avatar
Napster
Posts: 14
Joined: Sat Jul 05, 2008 9:06 pm
Location: Planet Earth

"Didactic Bytes" the dust...

Post by Napster »

Hey All,

Ive been stuck on this one for a while and I still havent got a clue how to convert from bytes to decimal and vice versa. Ive read something about a python string...no clue what that is...that coverts it.

Any simple advice would be fantastic, thanx in advance...
martin_great_boy
Posts: 23
Joined: Tue May 27, 2008 10:05 am
Location: Rockville

Don't forget....

Post by martin_great_boy »

byte is binary....
martin love A_ _ _ L
dorahan
Posts: 105
Joined: Tue May 27, 2008 10:36 am
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post by dorahan »

Haha... i think martin is right... the base is still binary numbering... by the way, remember byte is different with bit.. to convert from byte to bit you only need to divided by 8... haha sorry if out of topic.. :lol: Hahaha...
~� dorahan �~
HkRkoz al KuwaiT 2019 HaCkEr 101
User avatar
Napster
Posts: 14
Joined: Sat Jul 05, 2008 9:06 pm
Location: Planet Earth

Post by Napster »

Thanx for the replies guys but i still havent got a clue...I mean it tells me this..."Let us take the following three decimal numbers:
199, 77, 202
Convert each one into a byte. (Even though 77 does not require all 8 bits to express itself, when dealing with a group of data, we usually keep it in a consistent form.) Now, take those three bytes and combine them to form a 24-bit unsigned integer. The 199 byte is the high byte (most significant) and so forth. Please enter that 24-bit integer in decimal form, and that is your answer. (Hint: your answer will not be '19977202'!) "

So basically its Convert it to binary >Convert that to decimal...and you end up back where you started???
martin_great_boy
Posts: 23
Joined: Tue May 27, 2008 10:05 am
Location: Rockville

....

Post by martin_great_boy »

yes it's right, but remember....


8 bit interger is only 8 digit...



good luck :D
martin love A_ _ _ L
skragglies
Posts: 16
Joined: Tue Jul 15, 2008 8:07 pm
Location: Illinois

Post by skragglies »

oh no shit...thanks Martin
martin_great_boy
Posts: 23
Joined: Tue May 27, 2008 10:05 am
Location: Rockville

no problemm

Post by martin_great_boy »

no problem...


i can help you with the hints... but... i stuck at UpCount, Russian DOoll, One minute man, Don't blink, Bit test...

someone can help me?
martin love A_ _ _ L
SerpentineFire
Posts: 2
Joined: Mon Jul 14, 2008 9:37 pm

Post by SerpentineFire »

in this challenge i used base convertor from hex workshop

hope it helps you
TechnoDemon
Posts: 20
Joined: Tue Apr 13, 2010 7:48 am
Location: Makassar, ID

Re: ....

Post by TechnoDemon »

martin_great_boy wrote:yes it's right, but remember....


8 bit interger is only 8 digit...



good luck :D
based on http://en.wikipedia.org/wiki/Integer_%2 ... science%29 that i've read, the 8 bit integer (also known as 'byte'), only consist by 3 decimal digit. But you said 8 digit. Am i wrong, or i'm just mis-interpreted of what you said??

need ur reply a.s.a.p.
No Pain = Gain
That's how programmer develops...
User avatar
CodeX
Posts: 350
Joined: Fri Oct 17, 2008 5:28 pm

Post by CodeX »

A byte has 8 binary digits so can hold 2^8 values which 256 as it can represent 0 to 255. As you can see the largest number a byte can hold is 3 decimal digits long, but it cant hold a full 3 digit decimal number (10^3 = 1000, 0 to 999).
TechnoDemon
Posts: 20
Joined: Tue Apr 13, 2010 7:48 am
Location: Makassar, ID

Post by TechnoDemon »

I got it...
Challenge solved...
thanks to everyone...
No Pain = Gain
That's how programmer develops...
eddy
Posts: 1
Joined: Wed Apr 14, 2010 5:59 am

Post by eddy »

that is difficult but not immposible
eddy cool
Masti6
Posts: 55
Joined: Sat May 15, 2010 12:04 pm
Location: Finland, Nurmes

Post by Masti6 »

I was just having some problem with this myself, but I finally solved it after approx. 30mins.
If this still feels somehow complicated to someone, read below. But it is highly recommended to keep trying by yourself.






---
The trick is to use the hex values, combine them and change them into decimal again.
User avatar
0042
Posts: 56
Joined: Wed Jul 14, 2010 11:08 pm
Location: I'm on Skype! PM me for my username!

Post by 0042 »

Ugh. Brain hurts. Diactic byte... I'm getting a headache!!

Ok. *deep breaths*
233 is within the 0-255 range.
Hex uses sets of 4 in binary to create one in hex. (2hex is 0010)

But hex doesn't seem capable of depicting a three digit number.

I feel like I'm close but... What am I not getting?
"If you can read this, you must be really bored!"

Girl Hackers!! Because you don't need a penis to be good with computers!!
-----
Name: Jennifer
Age: 21
Number of n00bz used as cannonfodder: "Now serving #2,364,428!"
User avatar
CodeX
Posts: 350
Joined: Fri Oct 17, 2008 5:28 pm

Post by CodeX »

you can represent any integer using hexadecimal, just like you can in decimal and binary so 3 digit decimal to hexadecimal is no problem at all, the thing with hex is though it's radix (root, numerical base) is bigger than decimal's so it takes less digits to represent something in hex than decimal (over 9 anyway). You might want to look up hexadecimal on Wikipedia as will help you along, don't to too stuck on it being an handy way to represent machine data as it's base is a power of 2 i.e. 16 = 2^4 so can represent 4 bits, this is the same as a base 100 system would replace 2 decimal digits as 100 = 10^2.
Post Reply