Employers
Login | Register
contactus@sbts.in +91 (40) 2715 5333
Students / Candidates
Login | Register
Learn Electronics

Digital Electronics

Number Systems and Codes

Modern computers don’t work with decimal numbers. Instead, they process binary numbers, groups of 0s and 1s. Why binary numbers? Because electronic devices are most reliable when designed for two-state operations.

Decimal Odometer

Rene Descartes said that the way to learn a new subject is to go from the known to the unknown, from the simple to the complex. Let us opt the same method to learn binary system.

The simple Odometer (miles indicator) starts from 00000. After 1 mile the reading becomes 00001, and successive miles produce 00002, 00003, and so on, up to 00009.

A familiar thing happens at the end of the tenth mile. When the units wheel turns from 9 back to 0, a tab on this wheel forces the tens wheel to advance by 1. This is why the numbers change to – 00010.

Reset and Carry

The units wheel has reset to 0 and sent a carry to the tens wheel. This familiar action is ‘reset and carry’ function. After 999 miles the odometer shows 00999. What does the next mile do? The units wheel resets and carriers, the tens wheel resets and carriers, the hundreds wheel resets and carriers, and the thousands wheel advances by 1, to get 01000.

Digital Strings

The numbers on each odometer wheel are called digits. The decimal number system uses ten digits, 0 through 9. In a decimal odometer, each time the units’ wheel runs out of digits, it resets to 0 and sends a carry to the tens wheel. When the tens wheel runs out of digits, it resets to 0 and sends a carry to the hundreds wheel. And so on with the remaining wheels.

Binary Odometer

Binary means two. The binary number system uses only two digits – 0 and 1. All other digits (2 through 9) are thrown away. In other words, binary numbers are strings of 0's and 1's.

An Unusual Odometer

Visualize an odometer whose wheels have only two digits – 0 and 1. When each wheel turns, it displays 0, then 1, then back to 0, and the cycle repeats. Because each when has only two digits, we call this device a binary odometer.
In a car, a binary odometer starts with 0000 (zero)
After 1 mile, it indicates 0001(one)

Successive miles produce - 0010 (tw0); 0011 (three); 0100 (four); 0101 (five); 0110 (six); 0111 (seven); 1000 (eight); 1001 (nine); 1010 (ten).

Each mile advances the unit wheel by 1. Whenever the units’ wheel runs out of digits, it resets and carries. Whenever the second wheel runs out of digits, it resets and carriers. And other wheels too!

Binary Numbers

A binary odometer displays binary numbers, strings of 0s and 1s. The number 0001 stands for 1, 0010 for, and so forth. Binary numbers are long when large amounts are involved. For instance, 101010 represents decimal 42. As another example, 111100001111 stands for decimal 3,855.

Computer circuits are like binary odometers: they count and work with binary numbers. Therefore, you have to learn to count with binary numbers, to convert them to decimal numbers, and to do binary arithmetic. Then you will be ready to understand how computers operate.

Number Codes

People used to count with pebbles. The numbers 1, 2, 3 looked like

pebbles image

Codes

From the earliest times, people have been creating codes that allow us to think, calculate, and communicate. The decimal numbers are example of code

Decimal Pebbles Binary
0 0 0
1 one 01
2 two 10
3 Three 11
4 Four 100
5 Five 101
6 Six 110
7 Seven 111
8 Eight 1000
9 Nine 1001

Equivalence is the common ground between us and computers - it tells us when we are talking about the same thing. If a computer comes up with a binary answer of 101 it means the decimal answer is 5. As a start to understanding computers, memorize the binary decimal equivalences of the above Table

Why Binary Numbers are used?

The word “computer” is misleading because it suggests a machine that can solve only numeric problems. But a computer is more than an automatic adding machine. It can play games, translate languages, draw pictures, and so on. To suggest this broad range of application, a computer is often referred to as a ‘data processor’.

Program and Data

Data means names, numbers, and facts, anything needed to work out a problem. Data goes into a computer, where it is processed or manipulated to get new information. Before it goes into a computer, however, the data must be coded in binary form. The reason was given earlier – a computer’s circuits can respond only to binary numbers.

Beside the data, someone has to work out a program, a list of instructions telling the computer what to do. These instructions spell out each and every step in the data processing. Like the data, the program must be coded in binary form before it goes into the computer.

So the two things we must input to a computer are the program and the data. These are stored inside the computer before the processing begins. Once the computer run starts each instruction is executed and the data is processed.

Hardware and Software

The electronic, magnetic, and mechanical devices of a computer are known as hardware. Programs are called software. Without software, a computer is a pile of “dumb” metal.

Microprocessors

What is inside a computer? What is a microprocessors? What is a microcomputer?
Computer

The five main sections of a computer are input, memory, control, arithmetic and logic, and output.

Input

This consists of all the circuits needed to get programs and data into the computer. In some computers, the input section includes a keyboard that converts letters and numbers into strings of binary data.

Memory

This stores the program and data before the computer run begins. It also can store partial solutions during a computer run, similar to the way we use a scratchpad while working out a problem.

Control

This is the computer’s center of gravity, analogous to the conscious part of the mind. The control section directs the operations of all other sections. Like the conductor of an orchestra, it tells the other sections what to do and when to do it.

Arithmetic and logic

This is the number-crunching section of the machine. It can also make logical decisions. With control telling it what to do and with memory feeding it data, the arithmetic-logic unit (ALU) grinds out answers to number and logic problems.

Output

This passes answers and other processed data to the outside world. The output section usually includes a video display to allow the user to see the processed data.

Microprocessor

The control section and the ALU are often combined physically into a single unit called the central processing unit (CPU). Furthermore, it’s convenient to combine the input and output sections into a single unit called input-output (I/O) unit. In earlier computers, the CPU, memory, and I/O unit filled an entire room. With the advent of the integrated circuits, the CPU, memory, and I/O unit have shrunk dramatically. Nowadays the CPU can be fabricated on a single semi-conductor chip called a microprocessor. In other words, a microprocessor is nothing more than a CPU on a chip.

Microcomputer

As the name implies, a microcomputer is a small computer. More specifically, a microcomputer is a computer that uses a microprocessor for its CPU. The typical microcomputer has three kinds of chips: microprocessor, memory, and I/O (one or more chips).

GLOSSARY
Address Each memory location has an address, analogous to a house address. Using addresses, we can tell the computer where desired data is stored.
Alphanumeric Letters, numbers, and other symbols.
Base The number of digits (basic symbols) in a number system. Decimal has base of 10, binary a base of 2, and hexadecimal a base of 16. Also, called the 'radix'.
Bit An abbreviation for binary digit.
Byte A string of 8 bits. The byte is the basic unit of binary information. Most computers process data with a length of 8 bits or some multiple of 8 bits.
Central processing unit The control section and the arithmetic-logic section. Abbreviated CPU.
Chip An integrated circuit.
Chunking Replacing a longer string by a shorter one.
Data Names, numbers, and any other information needed to solve a problem.
Digital Pertains to anything in the form of digits, for example, digital data.
Hardware The electronic, magnetic, and mechanical devices used in a computer.
Hexadecimal A number system with a base of 16. Hexadecimal numbers are used in microprocessor work.
Input-output Abbreviated I/O. The input and output sections of a computer are often lumped into one unit known as the I/O unit.
Microcomputer A computer that uses a microprocessor for its central processing unit (CPU).
Microcontroller A CPU on a chip. It contains the control and arithmetic-logic sections. Sometimes abbreviated MPU (Microprocessor unit).
Nibble A string of 4 bits. Half of a byte.
Program A sequence of instructions that tells the computer how to process the data. Also known as software.
Register A group of electronic, magnetic, or mechanical devices that store digital data.
Software Set of programs.
String A group of digits or other symbols.