Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

you can represent 16 different values with 4 bits.

0000000100100011
0100010101100111
1000100110101011
1100110111101111

I understand, but when showing negative values you make the first of the 4 bits negative allowing 7 to -8, but I was wondering if there were other ways of representing negatives.

(1 edit)

Imagine trying to pack 10 pounds of shit into a 5 pound bag. ^_^

Like I said, you can store 16 different values with 4 bits. If you want to add another value, you're gonna have to add another space for it. I thought about some kind of compression scheme, where like you would take two bits, and output the first bit as the first value, and then output a 1 or 0 depending on if the second bit was the same as the first bit, but that turned binary into greycode with no reduction of size.

Fundamentally you cannot compress the most basic structure of digital data. You can only compress higher orders of data where there is some excess  'unused' space created by the data strucutre.

For example, BCD: it's not possible to compress a single BCD digit into smaller than 4 bits, but it wastes 6 values, so something like Chen-Ho can reduce 2 digit BCD from 8 bits to 7 bits, and 3 digit BCD from 12 bits to 10 bits.

I didn't make All things the same on official video