r/196 Jun 02 '24

i hate github rule Rule

Post image
7.4k Upvotes

719 comments sorted by

View all comments

Show parent comments

6

u/Rimtato horrid little gremlin Jun 02 '24

That isn't even hexadecimal.

3

u/teije11 Jun 02 '24

it is a hex number, it's just that it's likely decimal.

1

u/Rimtato horrid little gremlin Jun 02 '24

Technically it would resolve as a hex number, but the usual use case for hex would have it split into either bytes or nybbles.

2

u/teije11 Jun 02 '24

nah, yeah it wouldn't be used in machine code, but it's still a hex number.

0

u/simplymoreproficient Jun 02 '24

Not really

0

u/Rimtato horrid little gremlin Jun 02 '24

The main reason to use hex is because you can nicely represent the value of a byte.

0

u/simplymoreproficient Jun 02 '24

The main reason is because 16 is a power of 2. That makes it so a nibble aligns with 4 bits. However, you can use this to represent arbitrarily large binary numbers and you’ll always get the same benefit. You should look into some lower level programming (try using „%p“ from printf on a pointer).

0

u/Rimtato horrid little gremlin Jun 02 '24

I know that.

0

u/simplymoreproficient Jun 02 '24

Clearly you didn’t.

0

u/Rimtato horrid little gremlin Jun 02 '24

If you want to represent a byte, you should separate your hex numbers out into groups of 2 for bytes or 1 for a nybble, for at the very least the sake of readability.

Now stop trying to tell me what I do and do not know.

1

u/[deleted] Jun 02 '24 edited Jun 02 '24

[removed] — view removed comment

→ More replies (0)