          
         


            BITS, BYTES and MODEMS FOR BEGINNERS
                     by Paul D. Millikin
                      Peoria, Illinois


You've heard that computers can talk to each other, but you're
not quite sure how. If that's the sum total of your current
knowledge on the subject, this article is for you.

Each computer needs some new hardware, including a modem to
connect it to the telephone line, and a special circuit board
loosely called a Serial Port. It also needs a software package
to make the hardware go (like CrossTalk XVI, Smartcomm II,
PROCOMM, QMODEM, PIBTERM, or PC-Talk III, to name some of the
most common ones).

When the two modems make connection over the phone, the
sending modem sends a continuous audio tone, called a carrier,
to the other modem at a fixed frequency, say 2400 herz (cycles
per second). Simultaneously over the same line, the receiving
modem also sends a continuous signal, but at a different
frequency, say 1200 Herz. In that way, each modem has its own
"voice," so they can both talk at once without confusing each
other.

Output from the Calling Computer goes first to the Serial
Port, where the signal is specially treated for telephone use
and then sent on to the Calling Modem. The modem uses this
treated signal to MODulate the carrier tone. At the receiving
end, the Receiving Modem DEModulates the carrier tone and
sends the extracted signal to its own Serial Port. Here, it is
again specially treated and sent on to the Receiving Computer.
The end result is that when you type an "A" on the calling
end, an "A" appears on the computer screen at the receiving
end.

For all this to happen, however, the 2 computers must first
agree on certain standards, such as the rate of transmission
(bits per second or bps), the number of data bits, the number
of stop bits and the Parity. Some of those terms may sound
like Gibberish instead of English, but don't panic! Read on,
and they will be explained, in a relatively painless fashion.

First, you need to know a little bit about bits, or how
computers talk to each other in computer language instead of
English.

Bits are the electronic impulses from which the computer
alphabet is made. Computer electronic circuits operate on a
digital, binary system, which, translated into English, means
that each circuit component, no matter how tiny, is either ON
or OFF, just like a light switch.

ON usually represents a small negative voltage and OFF a small
positive voltage. Each voltage change, or electronic impulse,
is called a BIT, and the changes occur several million times
per second.

The ON, or negative bits are called 1 bits, and the OFF, or
positive bits are called 0 bits. Because there are only 2
kinds of bits, the whole system is called BInary. In fact the
word "BIT" is derived from BInary digiT.

In actual use, the computer groups the bits together in little
packets of 8, called BYTES. Each Byte represents one letter,
number, punctuation mark, or other character. The first bit in
a byte can be either 0 or 1, and the second bit can also be
either 0 or 1, giving 2x2, or 4 different ways that the 2 bits
can be put together, i.e., 1&1, 1&0, 0&1, and 0&0. Three bits
can be put together in  2x2x2 or 8 ways, i.e., 111, 000, 110,
011, 100, 001, 101, and 010. Expanding on that, there are
2x2x2x2x2x2x2x2=256 ways to put 8 bits together to make 1
byte. That gives the computer an alphabet of 256 characters,
with binary numbers from 00000000 to 11111111.

This alphabet has been standardized into the ASCII ("ask-ey")
code. The letters stand for American Standard Code for
Information Interchange, and were developed by the American
National Standards Institute (ANSI or "ans-ey").

The ASCII code is also known as the decimal code because it
assigns a decimal number as well as a binary number to each of
the 256 characters in the computer alphabet. The decimal
numbers are 0 to 255, corresponding to the binary numbers
00000000 to 11111111.

For example, ASCII number 65 (decimal number 65) stands for
capital A, but also for 01000001 in the binary code. When you
type a capital A on any computer, it sends a string of 8
voltages corresponding to the binary number, 01000001.

The first 128 ASCII characters are numbered from 0 to 127 and
are formed from the first seven bits, leaving the 8th bit set
at 0. This first half of the ASCII alphabet has 94 printable
characters, including both upper and lower case English
alphabets, numbers, punctuation marks, and symbols, like "$".
There is also 1 character to represent a blank space, and 33
control codes that normally do not print, but are used to give
certain special orders to the computer.

Obviously, most ordinary communication can be done with these
first 7 bits, but for more advanced purposes, the 8th bit can
be used to code the second half of the ASCII alphabet, numbers
128 through 255. This includes foreign language characters,
mathematical symbols, and an assortment of line graphic
characters not necessary for run-of-the-mill communication.
The eighth bit can also be used as a PARITY bit. More about
Parity later.

SERIAL AND PARALLEL BITS
Now that you're an expert on bits and bytes, let's take a
quick look at how modems work.

Inside the computer, within its numerous electronic chips and
circuits, the 8 electronic bits in each byte travel in 8
separate electronic channels, but lined up side by side,
8 abreast, like soldiers on parade. In this arrangement, they
are said to be IN PARALLEL. However, they can't travel that
way over a phone line because it doesn't have 8 separate
wires. For phone transmission, therefore, they have to be
changed to single file, one behind the other. In their new
alignment, the 8 bits are said to be in SERIAL arrangement.

PARALLEL TO SERIAL REARRANGEMENT
A special circuit board is needed to rearrange the bits.
Generically, it is called a Universal Asynchronous
Transmitter/Receiver or UART (you-art). Most UARTs use a
standardized interface system (between computer and modem)
called the RS-232-C.

Also, most of them are connected to the modem via a special
cable and a special, 25-pin plug called a DB-25, even though
fewer than 25 wires are actually used. The UART and DB-25 plug
together are often loosely called a Serial Port or an RS-232-C
port, or an Asynchronous Port. Many computers are sold with
this kind of port already installed, so if you have one in
your computer, all you need is an RS-232-C cable in order to
plug your modem into your computer. If you don't have a serial
port, a great many add-on multifunction boards contain one, so
it's simply a matter of deciding which board to buy and
install.

The primary function of the UART for the SENDING MODEM is to
take parallel bits from the computer, rearrange them in serial
fashion, and send them on to the modem. Conversely, the UART
for the RECEIVING MODEM takes serial bits from the modem and
rearranges them into parallel fashion for the computer.

The Sending UART also adds 2 special bits to each packet of 8
(byte). One, added on in front of the byte, is called a start
bit and the other, added on behind, is a stop bit. Both are
recognizable to a computer, so when the finished byte comes
out of the Sending Serial Port and goes to the modem, it's no
longer an 8-pack, but a 10-pack, with electronically
recognizable front and rear ends.

The Receiving UART strips out the start and stop bits and
throws them away. Then it rearranges the 8 serial data bits
into parallel and sends them on to the Receiving Computer.
Incidentally, just for the record, some modems, especially
some of the older and slower ones, require more than 1 stop
bit.

Finally, if PARITY is used, the UART has to use the 8th bit as
a PARITY BIT, setting it at a 0 bit or a 1 bit according to
whether parity is set at ODD or EVEN. PARITY refers to whether
the sum of all the bits in a byte is an even number or an odd
number. The bits in the letter C, for example (01000011) add
up to 3, an odd number, while those in the letter A (01000001)
add up to 2, an even number.

In practice, both the sending and the receiving modems must
agree on whether they want Parity to be odd or even, and set
their software accordingly. Suppose they agreed that Parity
should be Even. In the above example, when the C went through
the serial port, the 8th bit would be changed from 0 to 1.
Then the sum would be 4 (11000011), and parity would be even.
When the A went by, however, its bits already add up to 2, an
even number, so the 8th bit would remain a 0 bit, and parity
would still be even.

Nowadays parity isn't used much, but it does offer a simple
way to avoid errors in transmission. For example, if
electronic noise somewhere on the line accidentally changed a
1 bit to a 0 bit, it would change the meaning of the whole
byte. However, it would also change the parity from odd to
even or vice versa. Then, if both modems were operating at
Even parity, and one of them received a byte with Odd parity,
it would know that something was wrong and could either cancel
that byte or ask to have it retransmitted.

There are now more accurate ways of checking for transmission
errors, so it is possible to work with no parity at all,
leaving the 8th bit free for transmitting the EXTENDED ASCII
characters, numbers 128 to 255.

Notice in the above example, that with Even Parity, the binary
number for the letter C was changed from 01000011 to 11000011.
The latter correponds to ASCII number 195, representing a line
graphic character in the Extended Ascii alphabet.

How did the computer know whether it was receiving ASCII
number 67 (C) with a parity bit added, instead of ASCII number
195 (a line graphic character)? Because before you transmitted
it, you set PARITY at EVEN on your software, telling the
computer to treat the 8th bit as a parity bit rather than a
data bit.

SETTING YOUR MODEM
For two computers to communicate successfully with each other,
both must agree on the rate of transmission (number of bits
per second, on Parity, which may be set at Odd, Even, or None,
and on the number of Stop Bits. These parameters must be
entered into the software program BEFORE the call is made,
even if you don't know how the receiving computer is set.

Usually there is no problem because most people use a fairly
standard set of parameters. After the phone connection has
been made, if the screen fills with meaningless characters
("garbage"), the most likely cause is that one or more of the
parameters on the Receiving Computer are different from yours.
The number of bits per second (Baud rate) is perhaps the most
frequent offender. Resetting your parameters to a different
combination will frequently correct the situation.

The number of bits per second (bps) is usually 300, 1200, or
2400, although higher rates are becoming possible. Many modern
modems can automatically adjust their baud rate to that of the
Receiving Modem, without any input from you, but 1200 bps is
probably the most widely used rate at the moment and the best
setting to start with.

Most people don't use parity any more, preferring to use the
8th bit as a data bit in order to take advantage of the
extended Ascii code. Also, most modern modems need only 1 stop
bit, so the most common setting of these parameters is
probably  8 N 1. That means you are setting the modem to use 8
data bits, No parity, and 1 Stop Bit.

Perhaps the next most common setting is 7 E 1, meaning 7 data
bits, Even parity, and 1 Stop Bit.

So if you're a beginner, set your software at 1200, 8, N, 1,
and start calling. You'll be glad you did!

m away. Then it rearranges the 8 serial data bits
into parallel a

*************************END OF FILE***********************




