"Didactic Bytes" the dust...
"Didactic Bytes" the dust...
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...
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...
-
- Posts: 23
- Joined: Tue May 27, 2008 10:05 am
- Location: Rockville
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???
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???
-
- Posts: 23
- Joined: Tue May 27, 2008 10:05 am
- Location: Rockville
....
yes it's right, but remember....
8 bit interger is only 8 digit...
good luck
8 bit interger is only 8 digit...
good luck
martin love A_ _ _ L
-
- Posts: 16
- Joined: Tue Jul 15, 2008 8:07 pm
- Location: Illinois
-
- Posts: 23
- Joined: Tue May 27, 2008 10:05 am
- Location: Rockville
no problemm
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?
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
-
- Posts: 2
- Joined: Mon Jul 14, 2008 9:37 pm
-
- Posts: 20
- Joined: Tue Apr 13, 2010 7:48 am
- Location: Makassar, ID
Re: ....
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??martin_great_boy wrote:yes it's right, but remember....
8 bit interger is only 8 digit...
good luck
need ur reply a.s.a.p.
No Pain = Gain
That's how programmer develops...
That's how programmer develops...
-
- Posts: 20
- Joined: Tue Apr 13, 2010 7:48 am
- Location: Makassar, ID
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.
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.
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?
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!"
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!"
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.