Binary Hexadecimal Representations

FIELDS OF STUDY

Computer Science; Computer Engineering; Software Engineering

ABSTRACT

The binary number system is a base-2 number system. It is used by digital devices to store data and perform mathematical operations. The hexadecimal number system is a base-16 number system. It enables humans to work efficiently with large numbers stored as binary data.

PRINCIPAL TERMS

A mathematical number system is a way of representing numbers using a defined set of symbols. Number systems take their names from the number of symbols the system uses to represent numbers. For example, the most common mathematical number system is the decimal system, or base-10 system. Deci-means “ten.” It uses the ten digits 0 through 9 as symbols for numbers. Number systems can be based on any number of unique symbols, however. For example, the number system based on the use of two digit symbols (0 and 1) is called the binary or base-2 system.

Both the decimal and binary number systems use the relative position of digits in a similar way when representing numbers. The value in the rightmost, or first, position is multiplied by the number of digits used in the system to the zero power. For the decimal system, this value is 100. For the binary system, this value is 20. Both 100 and 20 are equal to 1. Any number x raised to the zero power is equal to 1. The power used increases by one for the second position and so on.




Decimal/Binary Table. Table organizes binary based values and decima based values by position, from 8 to 1, and by power, from seventh power to zero power.





Decimal/Binary Table. Table organizes binary based values and decima based values by position, from 8 to 1, and by power, from seventh power to zero power.

Using the decimal number system, the integer 234 is represented by placing the symbols 2, 3, and 4 in positions 3, 2, and 1, respectively.




Decimal/Digits table. Table organizes decimal values and the number of digits by position, from 3 to 1.





Decimal/Digits table. Table organizes decimal values and the number of digits by position, from 3 to 1.

In the decimal system, 234 = (2 × 100) + (3 × 10) + (4 × 1), or (2 × 102) + (3 × 101) + (4x100). The binary system uses the relative position of the symbols 0 and 1 to express the integer 234 in a different manner.




Binary/Bit Table. Table organizes binary based values and Bit values by position from 8 to 1.





Binary/Bit Table. Table organizes binary based values and Bit values by position from 8 to 1.

In the binary system, 234 = (1 × 128) + (1 × 64) + (1 × 32) + (0 × 16) + (1 × 8) + (0 × 4) + (1 × 2) + (0 × 1), or 234 = (1 × 27) + (1 × 26) + (1 × 25) + (0 × 24) + (1 × 23) + (0 × 22) + (1 × 21) + (0 × 20).

The binary number system is used to store numbers and perform mathematical operations in computers systems. Such devices store data using transistors, electronic parts that can each be switched between two states. One state represents the binary digit 0 and the other, the binary digit 1. These binary digits are bits, the smallest units of data that can be stored and manipulated. A single bit can be used to store the value 0 or 1. To store values larger than 1, groups of bits are used. A group of four bits is a nibble. A group of eight bits is a byte.

SAMPLE PROBLEM

To work with binary numbers in digital applications, it is important to be able to translate numbers from their binary values to their decimal values. Translate the following binary byte to its decimal value: 10111001

Answer:

The decimal value of the binary byte 10111001 is 185. The decimal value can be determined using a chart and then calculating.




Binary Hexadecimal Representations




The American Standard Code for Information Interchange (ASCII) was an early system used to translate basic characters into a numerical code readable by computers. The common characters on a keyboard are provided with decimal and hexadecimal codes.





The American Standard Code for Information Interchange (ASCII) was an early system used to translate basic characters into a numerical code readable by computers. The common characters on a keyboard are provided with decimal and hexadecimal codes.

The hexadecimal number system is a base-16 system. It uses the digits 0 through 9 and the letters A through F to represent numbers. The hexadecimal digit, or hex digit, A has a decimal value of 10. Hex digit B equals 11, C equals 12, D equals 13, E equals 14, and F equals 15. In hexadecimal, the value 10 is equal to 16 in the decimal system. Using hexadecimal, a binary nibble can be represented by a single symbol. For example, the hex digit F can be used instead of the binary nibble 1111 for the decimal value 15. Sixteen different combinations of bits are possible in a binary nibble. The hexadecimal system, with sixteen different symbols, is therefore ideal for working with nibbles.

One disadvantage of using binary is that large numbers of digits are needed to represent large integers. For example, 1,000,000 is shown in binary digits as 11110100001001000000. The same number is shown in hex digits as F4240, which is equal to (15 × 65,536) + (4 × 4,096) + (2 × 256) + (4 × 16) + (0 × 1).




Decimal/Hexidecimal Table. table organizes decimal based values and hexidecimal based values by position from 8 to 1, and power from seventh to zero.





Decimal/Hexidecimal Table. table organizes decimal based values and hexidecimal based values by position from 8 to 1, and power from seventh to zero.

Computers can quickly and easily work with large numbers in binary. Humans have a harder time using binary to work with large numbers. Binary uses many more digits than hexadecimal does to represent large numbers. Hex digits are therefore easier for humans to use to write, read, and process than binary.




Hexidecimal/Hex digits Table. Table organizes hexidecimal based values and corresponding hex digits by position from 5 to 1.





Hexidecimal/Hex digits Table. Table organizes hexidecimal based values and corresponding hex digits by position from 5 to 1.

—Maura Valentino, MSLIS

Australian National University. Binary Representation and Computer Arithmetic. Australian National U, n.d. Digital file.

Cheever, Erik. “Representation of Numbers.” Swarthmore College. Swarthmore College, n.d. Web. 20. Feb. 2016.

Govindjee, S. Internal Representation of Numbers. Dept. of Civil and Environmental Engineering, U of California Berkeley, Spring 2013. Digital File.

Glaser, Anton. History of Binary and Other Nondecimal Numeration. Rev. ed. Los Angeles: Tomash, 1981. Print.

Lande, Daniel R. “Development of the Binary Number System and the Foundations of Computer Science.” Mathematics Enthusiast 1 Dec. 2014: 513–40. Print.

“A Tutorial on Data Representation: Integers, Floating-Point Numbers, and Characters.” NTU. edu. Nanyang Technological U, Jan. 2014. Web. 20 Feb. 2016.