Digital Logic


Digital Logic: Like a blender or any other electrically powered appliance, the computer runs on electricity. Without electricity, a computer is just a slick-looking collection of rather expensive chunks of plastic, glass, and metal that have little value beyond keeping your desk from floating away. However, the computer uses electricity (actually, electrical charges) in ways the blender can’t at least not your everyday ordinary blender. (Digital Logic)

To store data, a computer also uses a few numbering systems. Numbering systems, such as binary and hexadecimal (more on these later in this chapter), allow the computer to take advantage of some basic properties of electricity to create, store, and process data. To understand what makes a computer tick, buzz, whir, and, of course, compute, you should have a basic understanding of how electricity and the numbering systems are used in the computer which is exactly what we provide you in this chapter. It may seem like a math lesson at times, but it’s painless, and you’ll be better informed for having read it. (Digital Logic)

Digital Logic

You have most likely heard the term digital used with watches, clocks, calculators, and other common items, but have you ever stopped to think about just what that meant? Digital doesn’t mean that a device displays its information in digits, it means the device creates, stores, and processes data using the two states of electricity positive and negative (technically, it’s non-positive, but more on that later). In effect, anything digital uses some form of automated computation to operate. And yes, this definitely includes the computer. (DIGITAL-LOGIC)

The opposite of digital is analog. An analog device expresses data as a continuing electrical wave that usually has a varying frequency or amplitude that is sent over a carrier wave. Your home telephone is most likely an analog device that carries the sound of your voice over the telephone wires with an analog signal wave. Other common analog devices are radios and televisions (not counting High Definition Television—HDTV, which is a digital device).

On the other hand, digital devices transmit,  store, and process data using the two-state properties of electricity. There are many digital devices around, such as CD players, HDTV, and most of the stuff at Radio Shack and the Sharper Image stores. (Digital Logic)

Computing in Binary Numbers

The primary storage device inside the computer is the transistor. Yes, the same device that made radios small enough to fit in your shirt pocket in the 1960s is the same miracle of science that allows your computer to store and process millions of bits of data. A single transistor is capable of holding an electrical charge that is either positive or non-positive. Since the objective of the computer is to manipulate data, the electrical states of the transistor (positive and non-positive) are assigned the numerical values of 1 and 0 (zero). It may seem that you can’t do very high math, or even low math for that matter, with only a 1 and a 0, but using the binary number system, the computer is fully capable of performing all of its magic.

The Binary Number System

The binary (the prefix bi meaning two) number system uses only the two values: 0 and 1. This matches the capabilities of the transistor perfectly, as the transistor can also have only two states or values, the two values of the binary number system and the two states of the transistor can be paired up so that the transistors positive state represents the value 1 and its non-positive state represents the value 0.

The bonding of these two systems allows the computer to use the binary number system. The computer stores a single binary numeral (either a one or a zero) in a single transistor. In fact, the word bit in computer lingo is a short form of binary digit. Each transistor holds a single electrical charge that is either positive or non-positive, which in turn represents a 1 or a 0. Eight bits are grouped together to form what is called a byte. A byte can store smaller integer numbers or a single character. The eight bits of a byte can create 255 different values in the binary number system.

So, what is the binary number system, that is, beyond its one and zero values? The binary number system is a base-two number system and represents values as exponential values of two. Compare this to decimal, which is a base-ten number system. Perhaps the best way to explain binary to you is to refresh your knowledge of decimals. (Digital Logic)

Decimal numbers, such as 101, are really a combination of individual values, each of which is expressed as a power of ten. In the case of the number 101, it really means 1 plus no 10s plus one 100. Everyone knows that, right? However, technically speaking, 101 really represents 1 times 10 to the zero power plus 0 times 10 to the first power plus 1 time 10 to the second power:

(1  *  102)  +  (0  *  101)  +  (1  *  100)  =  101

Likewise, the number 221 represents

(2  *  102)  +  (2  *  101)  +  (1  *  100)  =  221

Decimal values have ten numerals (0 to 9) to express how many of a particular power often is included in a number. The word decimal is derived from the word ten. (Digital Logic)

The binary number system works just like the decimal system with two exceptions: each place in a binary number represents a power of two, and the binary system has only two numerals (0 and 1) it can use to express how many of a particular power of two is included in the value. Other than that, the binary system works just like the decimal. (Digital Logic)

Probably the best way to think about how a power of two value is expressed in binary is that a one turns on a particular value, and the zero turns it off. For example, the binary number 101 represents the decimal value 5. Here’s why:

(1  *  22)  +  (0  *  21)  +  (1  *  20)  =  5

In this example, one time two to the second power plus one time two to the zero power adds up to the decimal number five.

Each numeral in the number represents a power of two, which gets bigger by one (starting from 0) moving to the left. However, if you tried inserting our decimal example of 4,321 into the binary number, it won’t be a direct fit. Remember that binary has only the numerals 0 and 1 to use to express how much of a particular power of two values is included in the value. In this case, you would need to substitute the actual values to represent this decimal number. (Digital Logic)

Picture By

This post contain the content of book PC Hardware:A Beginner’s Guide by RON GILSTER