Logic Levels

 
   

Analog Signals  Until now, we've been talking about voltage as a quantity that can take any value: 1.5 V, 12 V, 3.86438 V, 15432 V, etc. And we've been talking about voltage in that sense because voltage can continuously vary, and have any value. Voltages that can change continuously like this are called analog. Examples of circuits that use analog voltages include:

  • the voltage signal driving audio speakers
  • regular 120V AC from household outlets, which varies in a sinusoidal pattern from 0 V to about 170 V. (120 volts is the average voltage.)
  • traditional radio signals

 

Activities & Practice
to do as you read

Digital Signals  Another way to use voltages is to code information in a digital fashion. This means that the voltage signal can take on only two values, which are then used to signify the numbers 0 and 1. In the most commonly-used scheme, voltages of about 5 V (called HIGH) represent 1, and voltages near 0 V (called LOW) represent 0. A voltage signal that represents either a 0 or 1 is called a bit (for "binary digit"). You can think of a bit as the smallest possible unit of information. How can this be useful? Bits can be grouped together to form larger representations of information. For example, eight bits together is called a byte. A byte can represent any one of 256 values. A number scheme that uses only 2 digits is called binary. (Our normal number system, with ten digits --- 0 through 9 --- is called decimal.)

Examine this sequence of 8-bit binary numbers, listed with their decimal equivalents:

00000000    0
00000001    1
00000010    2
00000011    3
00000100    4
00000101    5
00000110    6
00000111    7
00001000    8
00001001    9
and so forth, until we get to the end of the sequence...
11111100    252
11111101    253
11111110    254
11111111    255

Where did the number 256 come from? Because each of the eight bits can have 2 possible values (0 or 1) the total number of permutations is 2x2x2x2x2x2x2x2 or 28, which is 256.

So a single byte can represent an integer between 0 and 255. A byte can also be used to code text characters. The most common such code is called ASCII (American Standard Code for Information Interchange). For example, in ASCII, the character 'A' is 01000001, the character 'B' is 01000010, etc. Loosely, then, you can think of one byte as a single character of text.

1. A group of four bits (half a byte) is called a nibble. A group of 16 bits (two bytes) is usually called a word. How many permutations (combinations) can be encoded with (a) a single nibble, and (b) a single word?

 

Why use digital signals?  Why would anyone want to code information this way? Why not just code numbers or letters as proportional to an analog voltage? (For example: 0.01 V represents 1, 0.02 V represents 2, etc.) This can work, and there are so-called analog electronic computers that operate on this principle. The problem with this approach is that it's actually very difficult to maintain the voltage on a wire at a precise value. Resistance causes voltage on long wires to drop, wires near each other can experience cross-talk, nearby motors can cause interference (also called noise, static, or spikes.) By using digital signals, any voltage near 0 volts represents 0, and any voltage near 5 V represents 1. The boundary level is somewhere in the middle (often about 2 V) and the static on the wire has to get really bad before the data starts being degraded.

 

 

Larger units of information  The SI prefixes kilo-, Mega-, Giga-, and (increasingly) Tera- are used to form larger units of information. In standard SI, kilo- means 1000, Mega- is 1,000,000 (a million), Giga- is 1,000,000,000 (a billion), and Tera- is 1,000,000,000,000 (a trillion). In the context of computer information storage, however, these powers-of-ten definitions are usually replaced with the nearest power of two.

  • A kilobyte (kB) is 210, or 1024 bytes
  • A megabyte (MB) is 220, or 1,048,576 bytes
  • A gigabyte (GB) is 230, or 1,073,741,824 bytes
  • A terabyte (TB) is 240, or 1,099,511,627,776 bytes.

Don't memorize those numbers! Just remember that a kB is about a thousand bytes, a MB is about a million bytes, a GB is about a billion bytes, and a TB is about a trillion bytes. For comparison, a megabyte is the amount of memory needed to store the text of a large book.

 

 

Additional Activities & Practice

2. The large SI prefixes tend to be used a lot in talking about computers. For example, a megabyte (MB) is about a million bytes of information. A byte is a unit of information storage, typically the amount of computer memory needed to store one character of text. What is the storage capacity of the hard disk (or disks) on your computer? (To find out, in Windows XP, go to My Computer and hover the mouse pointer over the icons representing each hard disk.)

3. What is the capacity of your computer's RAM? (The RAM is the memory that the computer's processor directly talks to. To find out, in Windows XP, go to My Computer and click on System Information on the upper left of the window. The "General" tab should list the amount of RAM.)

 
   

 

 

 

HTML Comment Box is loading comments...