[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Is anyone here familiar with hex conversion? I'm practicing

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 9
Thread images: 1

File: hex.png (4KB, 250x250px) Image search: [Google]
hex.png
4KB, 250x250px
Is anyone here familiar with hex conversion? I'm practicing and just converted the ASCII string MEMES to hex by hand and got 0x454d454d53

I tested with an online ASCII to hex converter and it came out EMEMS

I have a feeling it's something to do with "endiness" - if so I was hoping someone could enlighten me. The wiki article on it isn't compatible with my brain right now
>>
You can tell the sequence of letters by reading the hex characters in pairs, dummy.
>>
The bytes are in reverse order in a word
>>
>>58974361
yeah I know e.g. 4D = M, but I don't want to memorize all that. I've already got A-Za-z ASCII memorized and of course 10-15 hex is A-F. Obviously I"ll have a conversion chart on hand for any "real world" situations, I'm just doing this for learning purposes. Do you have the pairs of 2 hex to ASCII conversions memorized?

>>58974364
wait so why isn't S first then? SEMEM instead of EMEMS
>>
>>58974344
>I have a feeling it's something to do with "endiness"
Endianness? It might, yes. Explain how you got that 0x454d454d53, please.
>>
>>58974467
Using:
M = 77 ASCII
E = 69 ASCII
S = 83 ASCII

I converted each ASCII number to binary, then split the bytes in half (nibbles) then converted each nibble to a hex symbol. Then wrote the hex number in order e.g.

M (45) E (4D) M(45) E(4d) S(83)

but online ASCII to hex converters have it being

4D 45 4D 45 83 instead
>>
Intel arch is little-endian which means it stores numbers like 0x11223344 as 0x44332211. It seems counter-intuitive at first but it makes addressing easier. Say if you want the low byte you can just use the same address [n] whereas on big-endian systems you need to shift the address manually to [n+3].
>>
>>58974531
How do you get 0x45 for M? 77 is 0x4d. 69 is 0x45.

Your problem does not appear to have anything to do with endianness, despite superficially looking like that.
>>
>>58974617
AH! I know what I did wrong now, thanks. I messed up my bits:

Was doing M as (69)
0100 0101

instead of M as (77)
0100 1101

and doing E as (77)
0100 1101

instead of E as (69)
0100 0101

I shouldn't known since EMEMS just looks like the 2 characters are reversed
Thread posts: 9
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.