As a college professor, I sometimes state things that are “theoretically possible”. For example, using only bits, we can theoretically represent and manage all of the information on a computer. Practically speaking, when computers are managing terabytes of data, this is clearly infeasible. So, the information needs to be organized into useful units of information. The most basic grouping is to organize information into bytes (8 bit units) and words. The actual size of a word is often dictated by the natural word size of the computer you are working on. Depending on the computer, this could be 16, 32 or 64 bits. Note that the number of bits in bytes and words is a power of 2.
For example, a byte can be “01010110” and a word (assuming 32 bit words) can be “11001010001010100010010001111101”. At first glance, neither of these appears particularly convenient to use, since all bits are explicitly shown. In most cases, we won’t directly look at all the bits and rather treat it as a unit where we can find the value if we need to. For example, the main memory in a compute may have a capacity of 8 gigabytes. This memory is made available to the applications that need the memory, but typically we don’t need to look at the individual bits.
Even so, when we do need to look at binary values, the number of bits can be overwhelming. The binary strings can be abbreviated by using a hexadecimal notation. Each hexadecimal digit can take on one of 16 values (a power of 2, no accident) with the individual digits defined as follows.
- X”0″=”0000″
- X”1″=”0001″
- X”2″=”0010″
- X”3″=”0011″
- X”4″=”0100″
- X”5″=”0101″
- X”6″=”0110″
- X”7″=”0111″
- X”8″=”1000″
- X”9″=”1001″
- X”A”=”1010″
- X”B”=”1011″
- X”C”=”1100″
- X”D”=”1101″
- X”E”=”1110″
- X”F”=”1111″
Note that the values shown in the above list are the manner in which VHDL constants would be in included. Using the list, simply substitute the four bit pattern for the hexadecimal digit. For the examples above, “01010110”=X”56″ and “11001010001010100010010001111101”=X”CA2A247D”. This notation takes getting used to, but is quite convenient when you are in a situation where you are regularly working with binary numbers.
© 2016 Amrap Software, LLC.