logoalt Hacker News

vntoklast Friday at 9:22 PM1 replyview on HN

Your mental model is wrong. Read the post again, slowly, and it will probably make more sense to you. Here are the relevant bits

> This gives us the string `00000034` to uniquely represent this specific set of promotions, without information loss.

> How many possible strings are there? Generating this by brute force, we end up with 495 distinct strings

> This can be stored in 9 bits for each side

Hint: 2^9 is 512 and 512 > 495


Replies

01092026yesterday at 4:36 AM

You're proving my point. Yes, 495 possibilities CAN be stored in 9 bits. But the article shows STRING '00000034' (64 bits) as an example, not the actual 9-bit binary encoding. That's exactly the problem - claiming bit-level compression while showing byte-level examples.

And if you look at article, nothing is binary encoded, they are all integer representations all the way down.

Please someone show me a BIT implementation of this - THESE ARE BITS 0 1 0 1 1 0 - It's called BINARY. There are no 9, or 5, or 3 or 4.....That isn't how logic gates work.

A 3 / INT is 8 BITS...1 BYTE.

HINT: I'm right.

And you never answered my question:

"Has anyone implemented this with actual bitwise operations instead of integer packing?"

Still waiting to see these "9-bit" "bytes"."00000034".

Again, show me. There is no such thing as a 9-bit byte, that isn't how CPUs or computation work. ITS 8 BITS 1 BYTE, that is transistor / gate design architecture.

This is how computers work.

If you have 9 bits, you have 2 BYTES!!!!!

BYTE 1: 00100011 (8 bits) BYTE 2: 10000000 (9th - 7 wasted bits)

= 16 bits, 2 BYTES THANK YOU GOODBYEEEEEEEEE

show 1 reply