Granularity

Learn how to compare bytes, half words, words, and double words in terms of granularity.

Granularity

We divide memory into chunks of different sizes (granules) to store data fields. It helps us manage and access the data in an organized way. Memory space is generally divided into bytes, half words, words, and double words.

Using hexadecimal numbers

The hexadecimal number system has a base value of 16.

In the C/C++ language

If we want to use hexadecimal numbers in C/C++, we prefix them with 0x. For example:

Get hands-on with 1200+ tech skills courses.