can you make something smaller than 1 byte?

hello,
when i started learning c++ i was taught that the smallest variable you can make is a char which uses 1 byte to store its information.
however i just learned about something called a "nibble" which uses 4 bits instead of 8
so i was wondering if it was possible to make a variable use a "nibble" instead of a byte to make it use even less memory?
closed account (E0p9LyTq)
You might want to take a look at this, "Storing a nibble (4 bits) at a memory location"

http://www.cplusplus.com/forum/general/62051/
Sounds like you might want to read up on bit fields.

http://en.cppreference.com/w/cpp/language/bit_field
closed account (E0p9LyTq)
Peter87, excellent reference. Thanks for pointing it out so I can peek at it.
Topic archived. No new replies allowed.