Relationship between number systems

Online CS Modules: Comparing Number Systems

relationship between number systems

This table shows the number system conversion table, which indicates relationship between the decimal, binary, octal and hexadecimal. Early computers were designed around the decimal numbering system. The only difference between the two numbering systems is that binary uses only two. The table below gives the value of this number in binary, octal, decimal, and This relationship allows us to convert between these systems quite easily.

Further, the algebra defines a set of rules that can be used to construct statements, whose truth value can be tested. Any statement which is true for all values of the variables in it is said to be a theorem.

Difference between decimal and binary numbers

The theorems of Boolean algebra can be derived using the definitions of the operators and the truth table approach. Some of the important theorems are listed below.

relationship between number systems

For the sake of simplicity of expression, we use a shorthand notation for the operators. The ' ' operator will be implicitly assumed for any variables placed contiguously. Thus will be written as AB. Also, the parentheses will be introduced in expressions, with the usual meaning to denote the order of evaluation. Up till now, we have seen one variable expressions. Now we study expressions of more variables. Many of the above can easily be verified by using a truth table.

Others can be derived from the earlier verified ones. The purpose of learning these theorems, and Boolean algebra is so that we can manipulate Boolean expressions and derive equivalent, simplified forms given a more complex form. Since we shall eventually use such logic expressions in controlling automation of devices operating together, if we can derive simple expressions that have the same output as complicated ones, the resulting implementation will be cheaper, and less error prone.

There are two methods to simplify expressions, the algebraic method, and Karnaugh Maps. The algebraic method uses the theorems shown above and other ones derived using these to simplify expressions. It shall be demonstrated by the following example. How many gates would we need to implement the original expression? How many are needed to implement the equivalent expression? This approach made the creation of computer logic capabilities unnecessarily complex and did not make efficient use of resources.

For example, 10 vacuum tubes were needed to represent one decimal digit. Inas computer pioneers were struggling to improve this cumbersome approach, John von Neumann suggested that the numbering system used by computers should take advantage of the physical characteristics of electronic circuitry.

To deal with the basic electronic states of on and off, von Neumann suggested using the binary numbering system. His insight has vastly simplified the way computers handle data. Computers operate in binary and communicate to us in decimal. A special program translates decimal into binary on input, and binary into decimal on output. Under normal circumstances, a programmer would see only decimal input and output.

On occasion, though, he or she must deal with long and confusing strings of 1s and 0s that represent the content of RAM, the computers memory. Occasionally a programmer or computer engineer takes a snapshot of the contents of RAM on-bits and off-bits at a given moment in time. To reduce at least part of the confusion of seeing only 1s and 0s on the output, the hexadecimal base numbering system is used as a shorthand to display the binary contents of both RAM and secondary storage, such as disk.

The decimal equivalents for binary, decimal, and hexadecimal numbers are shown in Figure 1. We know that in decimal, any number greater than 9 is represented by a sequence of digits.

number system aptitude tricks

When you count in decimal, you "carry" to the next position in groups of As you examine Figure 1, notice that you carry in groups of 2 in binary and in groups of 16 in hexadecimal. Also note that any combination of four binary digits can be represented by one "hex" digit. FIGURE 1 Numbering System Equivalence Table The hexadecimal numbering system is used only for the convenience of the programmer or computer scientist, or computer engineer when reading and reviewing the binary display of memory.

Computers do not operate or process in hex. During the s and early s, programmers often had to examine the contents of RAM to debug their programs that is, to eliminate program errors.

relationship between number systems

Today's programming languages have user friendly diagnostics error messages and computer-assisted tools that help programmers during program development. These diagnostics and development aids have minimized the need for applications programmers to convert binary and hexadecimal numbers into their more familiar decimal equivalents. However, if you become familiar with these numbering systems, you should achieve a better overall understanding of computers.

And, someday you may need to read hex to decode an error message or set the jumpers on an expansion card. The only difference between the two numbering systems is that binary uses only two digits, 0 and 1, and the decimal numbering system uses 10 digits, 0 through 9. The equivalents for binary, decimal, and hexadecimal numbers are shown in Figure 1.

The value of a given digit is determined by its relative position in a sequence of digits. Consider the example in Figure 2. If we want to write the number in decimal, the interpretation is almost automatic because of our familiarity with the decimal numbering system.

Relationship between decimal binary octal and hexadecimal number systems | Conversion table

To illustrate the underlying concepts, let's give Ralph, a little green two-fingered Martian, a bag of decimal marbles and ask him to express the number of marbles in decimal. Ralph, who is more familiar with binary, would go through the following thought process see Figure 2. FIGURE 2 Numbering System Fundamentals Ralph, our two-fingered Martian who is used to counting in binary, might go through the thought process illustrated here when counting marbles in decimal.

Ralph's steps are discussed in the text. Ralph knows that the relative position of a digit within a string of digits determines its value, whether the numbering system is binary or decimal.

What is the relationship between base and number of digits? - Mathematics Stack Exchange

Therefore, the first thing to do is determine the value represented by each digit position. The third position is the base squared, orand so on. Because the largest of the decimal system's 10 digits is 9, the greatest number that can be represented in the rightmost position is 9 9 X 1.

The greatest number that can be represented in the second position, then, is 90 9 X In the third position, the greatest number isand so on. Having placed the marbles in stacks of 10, Ralph knows immediately that there will be no need for a fourth-position digit the thousands position. It is apparent, however, that a digit must be placed in the third position.