How do computers handle files with even more unusual bit sizes, like 12 or 36 bits?
General knowledgeAsked by Anonymous22 Oct 2026, 8:43 AM ISTUpdated
In one line
Computers use clever tricks to pack and unpack data when files use unusual bit sizes like 12 or 36 bits.
IBM 7090 — Mainframe computer, 1960s The IBM 7090, a famous 36-bit computer from the 1960s Image: Wikipedia
The rule
Computers store and process data in groups of bits, usually 8 (a byte), but can handle other sizes by packing bits together and splitting them as needed.
Let's understand it simply
Imagine you have a box that fits 8 ladoos (bytes). But someone gives you ladoos in packs of 12. You can't fit one pack in a box, so you break it up. You put 8 ladoos in one box, and the remaining 4 in the next box, then add 8 more from the next pack, and so on. Computers do something similar with bits. They break up and combine bits to fit them into 8-bit bytes, because that's what their memory is built around.
How it works
Data is split into chunks of the unusual size (like 12 bits).
These chunks are packed tightly into normal 8-bit bytes, sometimes crossing byte boundaries.
When reading, the computer unpacks the bits, combining parts from two or more bytes to get the original chunk size.
Special code or hardware keeps track of where each chunk starts and ends.
How computers handle 12-bit data
Split data into 12-bit chunks
Pack chunks into 8-bit bytes, sometimes splitting across bytes
When reading, combine bits from two bytes to get a 12-bit chunk
Repeat for all data
The story behind it
Early computers did not always use 8 bits per byte. Some used 12, 18, 24, or 36 bits because of the technology and needs at the time. For example, the old IBM 7090 used 36-bit words for scientific work. Today, 8, 16, 32, and 64 bits are standard, but some file formats (like some images or scientific data) still use odd sizes like 12 bits per pixel.
Where you see it in real life
Digital cameras: Some store each pixel in 12 or 14 bits for better color detail.
Old scientific computers: Used 36-bit words for calculations.
Medical images (CT scans): Often use 12 or 16 bits per pixel for accuracy.
Audio files: Some high-quality audio uses 24 bits per sample, which is not a multiple of 8.
Data compression: Some formats use 12 or 13 bits to save space.
Why it matters
Lets computers handle more precise data (like medical images or scientific numbers).
Saves storage space by not wasting unused bits.
Needed for compatibility with old systems or special devices.
Shows how flexible computers can be with data.
Common mistakes
Thinking computers can only use 8, 16, or 32 bits: They can handle any size, but it takes extra work.
Forgetting that packing/unpacking can slow things down.
Not realizing that reading 12-bit data may need combining two bytes and shifting bits.
Remember it
"Computers pack and unpack bits like ladoos in boxes—sometimes they split, sometimes they combine!"
Check yourself
Why do some files use 12 or 36 bits instead of 8, 16, or 32?
To save space or store more precise data, like in images or scientific work.
How does a computer read a 12-bit value from memory?
It combines bits from two bytes, using shifting and masking to get the correct 12 bits.
What is a common mistake when handling unusual bit sizes?
Thinking computers can't handle them, or forgetting that packing/unpacking is needed.
Quick recap
Computers can handle any bit size by packing and unpacking data.
Unusual sizes like 12 or 36 bits are split across standard 8-bit bytes.
Special code or hardware is needed to keep track of bit positions.
This method saves space and allows for more precise data.