Chapter 2: Number Systems
Logic circuits are used to generate and transmit 1’s and 0’s to compute and convey information. This
two-valued number system is called binary. As presented earlier, there are many advantages of using a
binary system; however, the human brain has been taught to count, label and measure using the
decimal number system. The decimal number system contains 10 unique symbols (0 ! 9) commonly
referred to as the Arabic numerals. Each of these symbols is assigned a relative magnitude to the other
symbols. For example, 0 is less than 1, 1 is less than 2, etc. It is often conjectured that the 10 symbol
number system that we humans use is due to the availability of our 10 fingers (or digits) to visualize
counting up to 10. Regardless, our brains are trained to think of the real world in terms of a decimal
system. In order to bridge the gap between the way our brains think (decimal) and how we build our
computers (binary), we need to understand the basics of number systems. This includes the formal
definition of a positional number system and how it can be extended to accommodate any arbitrarily large
(or small) value. This also includes how to convert between different number systems that contain
different numbers of symbols. In this chapter, we cover 4 different number systems: decimal
(10 symbols), binary (2 symbols), octal (8 symbols), and hexadecimal (16 symbols). The study of
decimal and binary is obvious as they represent how our brains interpret the physical world (decimal)
and how our computers work (binary). Hexadecimal is studied because it is a useful means to represent
large sets of binary values using a manageable number of symbols. Octal is rarely used but is studied as
an example of how the formalization of the number systems can be applied to all systems regardless of
the number of symbols they contain. This chapter will also discuss how to perform basic arithmetic in the
binary number system and represent negative numbers. The goal of this chapter is to provide an
understanding of the basic principles of binary number systems.
Learning Outcomes—After completing this chapter, you will be able to:
2.1 Describe the formation and use of positional number systems.
2.2 Convert numbers between different bases.
2.3 Perform binary addition and subtraction by hand.
2.4 Use two’s complement numbers to represent negative numbers.
2.1 Positional Number Systems
A positional number system allows the expansion of the original set of symbols so that they can be
used to represent any arbitrarily large (or small) value. For example, if we use the 10 symbols in our
decimal system, we can count from 0 to 9. Using just the individual symbols we do not have enough
symbols to count beyond 9. To overcome this, we use the same set of symbols but assign a different
value to the symbol based on its position within the number. The position of the symbol with respect to
other symbols in the number allows an individual symbol to represent greater (or lesser) values. We can
use this approach to represent numbers larger than the original set of symbols. For example, let’s say we
want to count from 0 upward by 1. We begin counting 0, 1, 2, 3, 4, 5, 6, 7, 8 to 9. When we are out of
symbols and wish to go higher, we bring on a symbol in a different position with that position being valued
higher and then start counting over with our original symbols (e.g., ..., 9, 10, 11,... 19, 20, 21,...). This is
repeated each time a position runs out of symbols (e.g., ..., 99, 100, 101... 999, 1000, 1001,...).
First, let’s look at the formation of a number system. The first thing that is needed is a set of symbols.
The formal term for one of the symbols in a number system is a numeral. One or more numerals are used
to form a number.Wedefine the number of numerals in the system using the terms radix or base.
#
Springer International Publishing AG 2017
B.J. LaMeres, Introduction to Logic Circuits & Logic Design with Verilog,
DOI 10.1007/978-3-319-53883-9_2
7