Page 1 of 2

"Didactic Bytes" the dust...

Posted: Fri Jul 11, 2008 8:04 am
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...

Don't forget....

Posted: Fri Jul 11, 2008 11:40 am
by martin_great_boy
byte is binary....

Posted: Fri Jul 11, 2008 12:43 pm
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...

Posted: Fri Jul 11, 2008 10:24 pm
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???

....

Posted: Sat Jul 12, 2008 12:31 am
by martin_great_boy
yes it's right, but remember....


8 bit interger is only 8 digit...



good luck :D

Posted: Tue Jul 15, 2008 8:27 pm
by skragglies
oh no shit...thanks Martin

no problemm

Posted: Wed Jul 16, 2008 6:49 am
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?

Posted: Wed Jul 16, 2008 7:15 am
by SerpentineFire
in this challenge i used base convertor from hex workshop

hope it helps you

Re: ....

Posted: Wed Apr 14, 2010 5:20 am
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.

Posted: Wed Apr 14, 2010 6:29 am
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).

Posted: Wed Apr 14, 2010 7:10 am
by TechnoDemon
I got it...
Challenge solved...
thanks to everyone...

Posted: Wed Apr 14, 2010 3:38 pm
by eddy
that is difficult but not immposible

Posted: Sat May 15, 2010 1:15 pm
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.

Posted: Sun Jul 25, 2010 1:48 am
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?

Posted: Sun Jul 25, 2010 7:36 am
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.