You are on page 1of 47

(eBook PDF) Introduction to Computer

Science by Perry Donham


Visit to download the full and correct content document:
https://ebooksecure.com/download/ebook-pdf-introduction-to-computer-science-by-pe
rry-donham/
Introduction to
Computer Science
Bassim Hamadeh, CEO and Publisher
John Remington, Senior Field Acquisitions Editor
Gem Rabanera, Project Editor
Alia Bales, Production Editor
Jess Estrella, Sen ior Graphic Designer
Trey Soto, Licensing Coordinator
Don Kesner, Interior Design er
Natalie Piccotti, Director of Marketing
Kassie Graves, Vice President of Editorial
Jamie Giganti, Director of Academic Publishing

Cop}'right © 2019 b}' Cognella, Inc. All rights reserved . No part of


th is publication may be reprinted, reproduced, transmitted, o r uti-
lized in any form or by an}' electronic, mechanical, or other means,
now known or hereafter invented, including photocop}'i ng, micro-
filming, and recording, or in any information retrieval system with-
out the written perm ission o f Cognella, Inc. For inquiries regard-
ing permissions, translations, foreign rights, audio rights, and an}'
other forms o f reproduction, please contact the Cognella Licensing
Department at rights@cognella.com.

Trademark Notice: Pro duct or corporate names ma}' be trademarks


or registered trademarks, and are used on!}' for identification and
explan ation without intent to infringe.

Cover image copyright© 2016 iStockphoto LP/Nongkran_ch.

Printed in the United States of America.

ISBN: 978-1-63487-673-5 (pbk) / 978-1-63487-674-2 (br)

cognella~I ACADE MIC


PUBLIS HI NG
Introduction to
Computer Science

FIRST EDITION

Perry Donham
Boston University

~.. cognella"I
"'~
ACAD EM IC
PUBLI SHING
For Colleen, en amour et amitie.
CONTENTS

Preface .................................................................................. xi Botton1 Line .................................................................... 36


Figure Credits ................................................................ 36
Chapter 1 A Short History of
Computation ........................................................................1 Chapter 4 Data Conversion and
Early Calculatio,1. ...........................................................1 Compression .................................................................... 39
Calculators versus Con1puters.................................4 Audio: Some Definitions ......................................... 39
Jacquard and Punched Cards...................................4 Analog to Digital Conversion ............................... 40
Charles Babbage ..............................................................5 Digital to Analog Conversion ............................... 4 1
The 1930s and Electro1nechanical Relays .... ..6 Sa1npling Levels ............................................................ 4 1
The Second World War................................................7 Data Co1npression ....................................................... 43
The Space Race .................................................................9 Coinpressing bnages.................................................. 46
Oh, IC ................................................................................. 10 Botton1 Line .................................................................... 48
The Personal Con1puter ........................................... 11 Figure Credits ................................................................ 48
What's Next? ................................................................... 12
Botto1n Line .................................................................... 12
Chapter 5 Binary Logic and
Hardware............................................................................. 49
Figure Credits ................................................................ 13
Electricity and Switches ........................................... 49
Chapter 2 Numbers and Bases.....................15 Transistors........................................................................ 50
What a Number Is ....................................................... 15 Gates .................................................................................... 51
Symbols, Numbers, and Bases.............................. 16 Binary Logic.................................................................... 52
Binary Nun1bers ........................................................... 17 De Morgan's Law .......................................................... 54
Bits and Bytes ................................................................. 19 Expressing Logical Equations \Vith Gates...... 56
Converting Decimal Nun1bers to Binary....... 20 From Gates to Circuits.............................................. 57
Octal Nun1bers .............................................................. 21 Adding Binary Numbers ......................................... 58
Hexadeci1nal Numbers ............................................. 23 Botton1 Line .................................................................... 60
Botto1n Line .................................................................... 25
Chapter 6 Networking: An
Figure Credit.................................................................. 25
Introduction....................................................................... 6 1
Chapter 3 Data Representation ....................27 Protocols ........................................................................... 6 1
Wired Nehvorks............................................................ 62
Storing Characters....................................................... 27
Encoding Data............................................................... 63
Storing Colors................................................................ 31
Fiber-Optic Cable ........................................................ 65
viii I Introduction to Computer Science

Encoding with Audio Tones .......................................66 Chapter 10 Introduction to HTML................113


Connecting Devices ........................................................67 HTML and Structure................................................... 117
Addressing ............................................................................67 HTML Tags ....................................................................... 117
Local Area Networks ......................................................67 Sin1ple HTML Tags....................................................... 119
Fran1ing the Bits ................................................................70 Bottoni Line ...................................................................... 120
Connecting Devices Together ...................................72 Figure Credits .................................................................. 120
Bluetooth ...............................................................................74
Other Protocols..................................................................75 Chapter 11 Programming Languages. . 121
Leaving the LAN ...............................................................75 Living Switches ................................................................ 12 l
Botto1n Line .........................................................................75 The Language of Ones and Zeros......................... 123
Figure Credits .....................................................................76 BASIC ................................................................................... 123
The First Co1nputer Prograin ................................. 125
Chapter 7 Networking: The lnternet...........77 Two Approaches to Prograin,ning....................... 125
Three Ways to Connect .................................................77 Libraries............................................................................... 127
Packet S\vitching................................................................79 Hello, World ...................................................................... 127
Internet Addresses............................................................81 Co1n1non Laiiguage Features .................................. 128
Routers ....................................................................................82 Loops..................................................................................... 132
Internet Na,nes ...................................................................86 Input and Output (I/0) .............................................. 132
Botto1n Line .........................................................................88 Math ...................................................................................... 133
Figure Credits .....................................................................89 Bottoni Line ...................................................................... 133
Figure Credits .................................................................. 133
Chapter 8 Networking: Services
and the Cloud ........................................................................91 Chapter 12 An Introduction to
Botto1n Line ...................................................................... 101 JavaScript. ...........................................................................135
Figure Credits .................................................................. 101 Some History.................................................................... 136
Front End versus Back End JavaScript .............. 137
Chapter 9 FOSS and Web Servers............... 103
Running Progra1ns fro1n the Co1n1nand
Richard Stallman and the Open-Source Move- Line \Vith Node.js ........................................................... 137
nient ....................................................................................... 103 Variables .............................................................................. 139
The Open-Source Con1niunity .............................. 107
Co1n1nents.......................................................................... l 43
Open-Source and Security ....................................... 108
Printing Out Values...................................................... 144
The Apache Web Server ............................................. 108
Reading in Values .......................................................... 146
Server Operations .......................................................... 109
The Senlicolon Controversy .................................... 146
The Universal Resource Locator (URL).... ... 110
Math Operators............................................................... 146
What Is in the Returned File? ................................. 111
JavaScript Libraries ....................................................... 149
Botto1n Line ..................................................................... 112
Boolean Values and Conditional
Figure Credits .................................................................. 112 Statements .......................................................................... 150
A Brief History of HTML......................................... 113 Loops..................................................................................... 153
Strings ................................................................................... 157
Contents I ix

Arrays ................................................................................... 161 Chapter 16 Making Money on the


.
F unctions ............................................................................ 163 lnternet ....................................................................................215
. ...................................................................... 166
Botto1n L111e Selling Bits.......................................................................... 216
Figure Credit.................................................................... 166 Selling Atoms ................................................................... 217
Selling Services ................................................................ 219
Chapter 13 JavaScript and HTML................ 167 Selling Space ..................................................................... 219
Event-Driven Programming.................................... 167 Selling Access ................................................................... 22 1
The Doctunent Object Model (DOM) .............. 172 Botton1 Line ...................................................................... 222
Input Boxes........................................................................ 177
Botto1n Line ...................................................................... 18 l Chapter 17 Operating Systems .. ..... 223
Figure Credit.................................................................... 182 What It Isn't ....................................................................... 224
Windo\v Managers ........................................................ 224
Chapter 14 JavaScript Objects. ....... 183 A Brief History of the Operating System ......... 224
Styles of Progran1n1ing ............................................... 183 What the Operating Syste1n Does........................ 227
Parts of an Object .......................................................... 184 Files and Directories .................................................... 232
Object Constructors..................................................... 189 Which Operating Systen1? ........................................ 233
Solving a Proble1n with Objects ............................ 191 Botton1 Line ...................................................................... 233
Botto1n Line ...................................................................... 199 Figure Credits .................................................................. 234

Chapter 15 Security and Privacy on the Chapter 18 Computer Components.............235


lnternet ....................................................................................201
General-Purpose Computers.................................. 235
On the Internet, Security Is Not Job One ........ 202
Three Things to Look For.......................................... 236
Attacks on Privacy and Freedon1 .......................... 207 Do-It-Yourself. ................................................................ 243
What Can You Do? ....................................................... 211
Botton1 Line ...................................................................... 244
Botto1n Line ...................................................................... 213
Figure Credits .................................................................. 245
Figure Credits .................................................................. 213
PREFACE
elcome to Lectures in Computer Science, a series of discussions on a wide-ranging
series of topics in the field of computing. The book is a companion text to CSlOl:
An Introduction to Con1puter Science as taught at Boston University.
As an introductory course, we try to give students a taste of what it's like to work in th e
technology sector by covering just enough material in each topic to whet the appetite, but
not to over,vhehn. In particular th ere are quite a few sin1plifications and generalizations
n1ade that I'n1 sure would 1nake a CS professor's hair stand on end, but these are 1neant to
provide a general kno\vledge of a topic, not an in-depth understanding. Most of the students
who take CSlOl are not con1puter science n1ajors, but many find th at there's a strong tie-in
bet,veen tools and techniques covered in the course and their own field of interest. It isn't
unusual for non-CS majors to add a CS n1inor after taking CSlOl.
About one quarter of the course is dedicated to learning a little about the art of pro-
granuning. To keep the material interesting to a non-CS audience, I've focused on applying
JavaScript progra1nming to HTML pages, including 1nanipulating CSS. It's fun to see your
programs come to life on the web page, and many students come out of th e section eager
to learn n1ore on their o,vn.
I'm ahvays looking for \vays to improve the course and the text; if you have an idea, please
share it with me at perryd@bu.edu. I hope that you enjoy th e course!

X1
CHAPTER
A Short History
of Computation

he history of con1putation is really the story ofhun1an civilization and its developn1ent

T over thousands of years. We often think of co1nputing as a recent endeavor, but in


fact we as a species have been figuring th ings out with the aid of 111echa nical devices
since ,ve started walking a round on two feet. That's not to say that Homo erectus roamed
grasslands ,vith slide rules, but even pri1nitive 111an 1nade use of th e tools at hand- sto nes,
notched sticks, length s of knotted grass- to solve th e si1nple math em atical problem s of
everyday life.
Many of those proble1ns related to the rhythn1s of the natural world, and so we see early
atten1pts at tools to predict the seasons. The m egalithic structures of Great Britain, such
as Stonehenge, were constructed such th at the sun, 1110011, a nd prominent stars would line
up in predictable patterns m arking transitions from gro,ving season to harvest, from flood
time to planting ti1ne, from ne,v moon to full. Today we rely on sophisticated electronic
devices to 1nake these calculations, but prin1itive 111an did seem ingly just fi ne.
An interesting thread runs through this history, ,vhich is t hat con1putation hasn't changed
all that 1nuch. Basic mathe1natical truths laid down m illennia ago still hold, as do the
1neth ods for transforn1ing ntunbers based on then1; adding two nu 1nbers together is the
san1e now as it was in Ron1an ti1nes. What has changed is the speed a nd precision of our
calculations; th e con1puting devices th at we use in our daily lives are capable of executing
billions of calculations every second, a rate that, even just 50 years ago, ,vould have seemed
utterly in1possible. W hen ,ve think about the current state of computing, it see1ns that we
have fulfilled Clarke's Third La,v: "Any sufficiently advanced technology is indistinguish-
able fron1 n1agic."

Early Calculation
Prim itive hum ans did n't need a lot of complex calculations. One can i1nagine that 1nost
of their comn1unication around ntunbers ,vere focused on how m any of son1ething th ere
were: "How m any antelope a re over th at hill?" Holding up a few fingers or wavin g a n arn1

1
2 I Introduction to Computer Science
FIGURE 1-1 An ancient calculator
in the air probably sufficed to get the message across
(Figure 1-1). It isn't surprising, then, that early cal-
culations ,vere done on our fingers. In fact, even the
word digit, which we use to represent a number, is
the same word that we use for a finger.
Another word that you n1ight be familiar with that
relates to n1athen1atics is calculus. The English word
calculate co1nes from the Latin calculus, for pebble,
and is derived from methods of early calculations
done with systen1atic arrangements of stones. At first,
the stones were placed into piles, with stones being
moved around to perfonn si1nple 1nathematical
operations like addition and subtraction. In Baby-
lonian ti1nes calculating boards (Figure 1-2) were developed with shallow depressions to
hold stones in a defined pattern, and these allowed individuals to perfonn slightly more
con1plex calculations.
For thousands of years, this kind of sin1ple arithn1etic ,vas sufficient, and it ,vasn't until
the widespread developn1ent of trade and accounting that n1ore complex operations became
necessary. Four thousand to five thousand years ago, Chinese n1athe1naticians developed
the abacus (Figure 1-3), ,vhich was a representation of the earlier simple stone mechan isms

FIGURE 1-2 A counting board


Chapter 1 A Short History of Computation I3
FIGURE 1-3 A modern abacus made
codified into a standard device. The abacus is still in use, and a skilled in Poland
user can perforn1 calculations as quickly as they can think them.
In some cases it \Vasn't a calculation per se that \Vas important, but
a prediction, or perhaps a marking of seasonal events. When we look
at neolithic installations such as Stonehenge, fron1 about 4,500 years
ago (Figure 1-4), what we see today is an enig1natic collection of stones
arranged in a very specific pattern. A lot of conjecture over the centuries
has tr ied to identify exactly what these installations were used for, but
recent research has sho\vn that at least part of t heir function was to
serve as a calendar of important events, such as solstices and equinoxes,
floods and eclipses, and the start and end of seasons.
A sophisticated and fascinating Greek device fro1n around 100 BC
\Vas discovered in the remains of an ancient ship\vreck in 1901 off of
the Greek island of Antikythera. The device, shown in Figure 1-5, was
heavily corroded and nearly in1penetrable for 100 years after its discov-
ery, but studies have shown that the device is a type of orrery, a con1plex
calculator that demonstrates the positions of the planets, t he stars,
the passage of time, and was possibly used as a teaching aid. It also tracked the dates of
Olyn1pic events, held every four years. A recent study showed that the back of the device
had the equivalent of an instruction manual, although it doesn't specify how to use the
device, but rather all of t he features that the device has, an example of so1ne very early
con1puter n1arketing n1aterial.

FIGURE 1-4 Stonehenge, a neolithic mega-calculator


4 I Introduction to Computer Science
FIGURE 1-5 A modern reproduction of the Antikythera Calculators versus Computers
device
Early devices ,vere intended for calculation, performing
n1athen1atical operations such as addition and sub-
traction. By modern definition these were not truly
computers; they didn't have a ,vay to store and execute
instructions or to store intern1ediate and final results.
We might consider the start of 1nodern computa-
tion to be the 17th century. In the early to 1nid-1600s,
mechanical devices started to appear that operated by
n1eans of a series of gears, cranks, and springs, designed
to do specific calculations. For exa1nple, in 1642 Blaise
Pascal built a 111echanical calculating 1nachine kno,vn
as the Pascaline (Figure 1-6), ,vhich ,vas designed to
add, subtract, n1ultiply, and divide. The Pascaline was
produced in 1nodest quantities and was the basis for
many other calculating n1achines in that tin1e period.
The calculator used a series of rotary dials, not all that
different from t he ones used in old-style telephone
handsets, and nun1bered discs behind s1nall ,vindows
that indicated input and output values. Although there
were earlier 1nachines, Pascal's innovation of a carry
mechanis1n that allowed nun1bers to be carried fro1n
one colun111 to another ,vas revolutionary.
The Pascaline was used for rather mundane purposes
FIGURE 1-6 A Pascaline built in 1652 for such a revolutionary instrument . The device ,vas
installed in Pascal's father's office to co1npute the tax
on sales and inventory. About 20 of these were n1ade,
and it was the first calculator to receive a royal patent.

Jacquard and Punched Cards


Another innovation that led to what ,ve know as
modern comput ing ,vas developed in the very early
1800s by Joseph Jacquard. The proble1n he was trying
to solve was that textile mills at the tilne could create
beautiful cloth ,vith elaborate patterns, but t hrough a
highly labor-intensive process. Workers had to man-
ually feed colored threads and yarns into a weaving n1achine follo,ving a written pattern,
and the 1nore complex patterns required that the machine be stopped frequently as new
threads or ne,v colors ,vere introduced into the pattern. Jacquard auton1ated this process
by creating a system that read patterns off of punched cards; multiple spools of thread
or yarn were set up on the loo1n and as a wheel turned, threads were lifted or retracted
depending on whether or not a hole was present on a punched card. The cards, each
Chapter 1 A Short History of Computation I5
FIGURE 1-7 Punched cards in a Jacquard
represent ing a row of weaving, could be chained together. This loom
allowed extren1ely con1plex patterns to be produced ,vith very little
n1anual labor (Figure 1-7).
Although it wasn't a general-purpose solut ion, the not ion of
storing information on punched cards to be read later by a n1achine
led to early techniques in computing of storing programs on punch
cards. The loon1 could be "reprogran1med" simply by loading ne,v
cards into it . Charles Babbage was inspired by Jacquard's work to
use punched cards in the design of his analytical machine.

Charles Babbage
Around the sa1ne tin1e t hat Jacquard was perfecting his card
111echanism, 1nathematician Charles Babbage was working on the
designs for a series of \Vhat \Ve no,v ,vould call co1nputers. The first,
called the difference engine, ,vas designed to calculate polyno1nial
functions mechanically. The problen1 that Babbage was trying to
solve was that these kinds of calculations were done by human
computers, compiled into tables, and then bound into books, and
it wasn't unusual for these dense books of 1nathe1natical fonnulas FIGURE 1-8 A portion of Babbage's analyt-
and results to be riddled ,vith errors, and of course just the amount ical engine. built as a test (London Museum)
of labor required to produce then1 was vast.
The difference engine was entirely mechanical, and though it ,vas
backed by the British government, the 1netalworking and 1nachin-
ing techniques of the day were not sufficient to realize Babbage's
designs in n1etal. After several years of atten1pting to build a ,vork-
ing difference engine, the British government pulled out of the
project, and the device was never con1pleted.
The difference engine was built to solve a very specific prob-
lem, that of evaluating polyno1nials. A second device designed
by Babbage, called the analytical engine, was the precursor to our
n1odern computer (Figure 1-8). It included an arithmetic unit that
did calculations such as addition, subtraction, division, and 1nul-
tiplication, ten1porary storage in the fonn of a register that could
hold dozens of intennediate results, and, more in1portantly for the history of computing,
it was programmable in that instructions could be input to the device using punched
cards, sin1ilar to those being used by Jacquard in his auto1nated loo1n.
Unfortunately, funding and t he limitations of metalworking of the day doomed the
n1achine in the same way that the difference engine had been. Work was never con1pleted
on the analytical engine. Babbage died in 1871, perhaps not realizing the incredible legacy
that would lead to con1puters as we kno\v then1 today. It ,vasn't until 100 years later, in the
mid-l 940s, that his ideas and designs were realized in the first modern electrical con1puters.
6 I Introduction to Computer Science
FIGURE 1-9 Components of a relay: A coil of wire (1) acts as an electromagnet; when energized. it pulls down an
armature (2). opening an electrical contact (3)

""1

The 1930s and Electromechanical Relays


Prior to the 1900s, "co1nputers" \Vere entirely mechanical devices; although so111e were
po,vered by stea111 engines, they essentially relied on co1nplex interactions of gears, springs,
levers, and dials to do their work, often driven by a hand crank. In the ea rly 1900s, how-
ever, co1nputer architecture was revolutionized by a small electrical component called a
relay. You can see one in Figure 1-9. The relay is an electromagnetic device that opens and
closes a switch based on an input voltage. When voltage is applied to the relay, the switch
closes, and when voltage is released, the s,vitch opens.
You might wonder why this was such an important event in co1nputing history. A relay
that has two states, open or closed, is ideal to represent a binary number, which is either
a one or a zero. By co1nbining relays toget her into
FIGURE 1-10 A replica of the Zuse Z3 computer; banks of patterns, it now was possible to design electrical cir-
relays can be seen in each cabinet cuits that implemented binary logic. Such logic could
be applied to any arbitrary co1nputing problem. For
exa111ple, to add two nun1bers together required just
a handful of relays arranged in a specific pattern; you
can see this sort of arrangement in Chapter 5, where
we exa1nine a binary adding circuit.
During t he 1930s researchers began to build dig-
ital con1puters using relays, such as Zuse (Figure
1-10) in Germany, Io,va State, and Bell Labs, whose
team built the Mark 1 co1nputer based on designs by
Charles Babbage. The roo111-sized Mark 1 has fe,ver
capabilities than a five-dollar calculator of today: you
could store only 72 nu1nbers; it required a tenth of
a second to add t,vo nu1nbers together and over six
Chapter 1 A Short History of Computation I7
FIGURE 1-11 Vacuum triode tubes from 1918 to 1960
seconds to multiply hvo numbers together. Still, con1-
pared to earlier atten1pts, these early mach ines ,vere
astoundingly fast.

The Second World War


It is a sad co1nmentary on our species that ou r best
innovation comes in finding better ways of killing
each other. Such it was with con1puting. In the early
1940s a device called a vacuum tube becan1e econom-
ically feasible to manufacture in large quantities. The
vacuu1n tube (Figure 1-11) had been invented at th e
tu rn of the century and ,vas essentially an electro -
n1echanical relay redesigned to use only electricity.
The relay's s,vitch ,vas replaced by two terminals, separated by a vacuun1, sitting inside a
sealed glass cylinder. Electrons would flow across the vacuu1n fro1n one tenninal to th e
other when electricity ,vas applied to a control grid placed between the t,vo. The tubes
operated very similarly to the mechanical relay, but because electrons were used instead
of n1echanical switches, they were vastly superior in tenns of speed.
As the hostilities that led up to World War II ramped up, governments around the ,vorld
searched for more efficient ,vays to perfonn th e calculations required for war. One n1ajor
application for th is kind of computing was the compilation of ballistic tables. Imagine
that you are a field co1nmander on the battlefield, and you want to shoot your cannon at
an ene1ny located on a d istant hill. You n1 ight 1nake an educated guess about the elevation
of your cannon; that is, how high up in the air you will aim, based on the distance to the
target and your relative elevation to it. That first shot is probably going to 1niss, and so a
spotter ,viii call out a correction: "T,vo degrees to the left ! And one degree up!" The second
shot is likely to n1iss, also. Eventually, though, you'll ho1ne in on the target and drop your
shells right on the ene1ny's location .
The problem is that only an exceptionally stupid ene1ny would just sit there while you
dial in the correct para1neters for your can non . By the tin1e you hon1e in on their location,
the enen1y has 1noved well away.
The difficulty is that there are 1nany factors in play that affect the flight of your projec-
tile. The temperature, wind direction and velocity, relative hu1nidity, and oth er factors
all co1nbine to make each engage1nent unique. To solve this problen1, war depart1nents
,vould e1nploy htunan calculators, prin1arily ,vomen, who would sit in rooms all day long
calculating all of the variables that need to be taken into account ,vhen firing artillery. The
result ,vould be thick books full of tables that a field co1nmander could consult, plugging
in the current conditions and reading off the correct settings to aim th eir can non.
Automating this sort of calculation was a huge boon for the n1ilitary, as it allowed for
the rapid production and disse1ninat ion of th is specialized information, and the num-
bers produced by co1nputers tended to be more accurate th an those produced by hand.
And so, many of the early computers, especially in the early 1940s, were tasked with this
sort of 1nilitary application. One of the first modern computers, ENIAC (Figure 1-12)
8 I Introduction to Computer Science
FIGURE 1-12 Glen Beck Ueft) and Betty Snyder (right)
program ENIAC (US Army photo} was built at the University of Pennsylvania in 1946.
It contained just under 20,000 vacuum t ubes and
over 1,000 relays, ,veighed 30 tons, and consumed
140,000 ,vatts of power. It was t he size of a large room,
and ,vorkers circulated behind the cabinets nonstop
replacing tubes that had burned out, or relays that
had corroded. It ,vas prin1arily used to calculate bal-
listic tables, but was also used to study the effects of
thennonuclear weapons.
Other ,varti1ne applications included breaking
enen1y codes, such as was done by the Colossus com-
puter built in 1943 by the British governn1ent based
on designs by Alan Turing.

The Von Neumann Archi tecture


All of these early machines designed and built in the
1940s were single-purpose computers. The progran1 of interest ,vould be loaded in to the
computer, data input, and the con1puter essentially ,vorked as a giant auton1ated calculator
outputting results, albeit n1uch faster than calculators could, and probably more accurately.
If you wanted to run a different progran1, the current progran1 had to be stopped, unloaded,
and the new program loaded in, often by configuring jumper cables on the front of the
con1puter console, si1nilar to the way that a telephone s,vitchboard worked at the time.
John von Neun1ann, a Hungarian n1athematician ,vorking in the United States at the Uni-
versity of Pennsylvania, coauthored a paper in 1945 describing an architecture that allowed
the computer to store a logical program for sequence of operations in internal memory,
along ,vith the data that ,vas being operated on. This design had a logical unit, a control
unit, input and output devices, and 1nemory to store the progra1n in data. In practice, the
computer ,vould fetch instruction fro1n 1nemory, fetch data, process it, and place the results
back in n1en1ory. It becan1e known as the Von Neun1ann architecture, sho,vn in Figure 1-13.
You might recognize the Von Neumann architecture as being si1nilar to Babbage's ana-
lytical engine, and you ,vould be correct . It took 100 years of thought and developn1ent
to realize Babbage's drea1n of a universal co1nputer.
FIGURE 1-13 The basic Von Neumann architecture Nearly all general-purpose co1nputers bu ilt in the
1950s on,vard e1nploy the funda1nental architecture,
and it's the san1e architecture that you'll find in your
Central Processing Unit
laptop or desktop computer. That's not to say that

I ControlUntt
I
the architect ure was a cu re-all and that in1n1edi-
ately follo,ving publication of the tea1n's paper the
Input
Device
I
Arithmeticll.ogic Unit I Output
Device
face of computing changed forever; programming
these machines ,vas still extremely tedious, and even
though the analog 1nethod of inputting a progra1n
using patch cables was eli1ninated, programming
Memory Unit
still involved putting instructions in binary code,
ones and zeros, wh ich was an arduous process and
Chapter 1 A Short History of Computation I9

prone to error. It ,vasn't until the 1950s and later that higher-level programming languages
,vere developed that used hun1an readable keywords to implen1ent progra1nming logic.

The Space Race


The introduction of digital computers in the 1930s and 1940s, po,vered by electromechan-
ical relays, and then later on by vacuun1 tubes, set the stage for the next large revolution
in con1puting. In the 1940s the team of Bardeen, Brattain, and Shockley developed a new
device called a transistor. The transistor operates in essentially the sa1ne way as a vacuum
tube or relay in that it can turn on or off, depending on the application of a control signal.
The n1ajor diffrence is that transistors are solid-state devices and have no n1oving parts;
they are manufactured out of silicon, which is derived fro1n sand, and even the earliest
transistors ,vere orders of n1agnitude sn1aller than any relay or vacuun1 tube that had been
produced up until that time. Further, they were sn1aller, faster, n1ore reliable since there
are many parts, and 1nuch cheaper to 1nass-produce than either relays or vacuu1n tubes.
They also constuned significantly less power than earlier devices.
Since the transistor was essentially an in1provement on the electromechanical relay and
the vacuu1n tube, the architecture of co1nputers designed around those two devices could
be extended by using transistors in their place. As the 1950s 1noved into the 1960s and the
space race began to heat up, transistors 1noved to the forefront of electronic developn1ent.
Imagine tllat you were sending n1en into space on top of a n1assive rocket. Electronic devices
on that rocket can't really be made of vacuu1n tubes, ,vhich are made of glass and easily
break, nor can they be n1ade of relays, which are 1nechanical devices and prone to jan1n1ing,
bending, and corruption of their contacts. Neitller of those devices could really withstand
tile enorn1ous forces generated by launching a rocket. Transistors, ho,vever, have no 1noving
parts and are tiny, which means that they are light, and they require far less po,ver than either
tubes or relays. They were ideal for designing electronics n1eant to be launched into space.
This was the age of the transistor radio and other consun1er devices that fell out of the
enormous engineering development effort undertaken by space agencies around the world.
As consumer electronics became 1nore popular, t he cost of manufacturing individual
devices fell significantly, which n1eant that co1nputers in general beca1ne less expensive
to manufacture. We started to see large co1nputers being deployed not just for 1nilitary
purposes but also in businesses to do all sorts of tasks; accounting, human resources,
docu1nentation, design, and just about anything else that a business needed.
Along with the spread of these new con1puters into environn1ents such as business and
education can1e a need for new and n1ore efficient ways to progra1n them. This ,vas the
golden age of progra1nming languages, with new languages such as Fortran in 1957 and
COBOL in 1960 being developed to serve specific populations. Fortran, ,vhich stands for
FORn1ula TRANslation, was designed for academic and research purposes, ,vhile COBOL,
,vhich stands for C01nmon Business Oriented Language, was developed for generating
reports and doing t he kinds of accounting that businesses required. Other languages
fro1n this time included the Beginners All-purpose Symbolic Instruction Code, or BASIC,
developed in 1959, and LISP (LISt Processor), also developed in 1959 at MIT.
10 I Introduction to Computer Science
FIGURE 1-14 Katherine Johnson
This era also sa,v the rise of strictly co1nputer-oriented companies,
such as Digital Equipment Corporation, founded in 1957, and Interna-
tional Business Machines, IBM, ,vhich had in fact been in the business
of co1nputing for a very long time, but now sa,v new markets open up
as the demand for con1puting resources ramped up.
This ,vas a n1assive shift; in the 1950s a calculator literally was a person
sitting at a desk ,vith a slide rule or table of logarithms doing complex
calculations by hand. For exan1ple, Katherine Johnson, shown in Figure
1-14, ,vorked at the agency that would become NASA as a n1athe1nati-
cian, designing airfoils, calculating trajectories of rockets, and other
highly co1nputationally intensive tasks. John Glenn, the first American
to orbit the earth in his Mercury aircraft, distrusted the numbers that
had been generated by NASA's con1puters, and asked Katherine Johnson
to verify the calculations by hand. Johnson went on to work with the
Apollo moon n1issions and the space shuttle progran1.

Oh, IC
There was one n1ore enormous innovation to come. The transistor ,vas revolutionary in
that it 1nin iaturized the hardware required to build co111puters, but the designs ,vere not
all that different than the tube- and relay-based computers of the earlier era; the transistor
essentially just replaced the tube or the relay. The electric circuit boards that n1ade up these
transistor-based co1nputers were still quite complex, and the logic circuits built from the
individual transistors required quite a bit of physical space to iinplement. In tile mid-1960s
multiple teams in academia and industry were working on a way to package transistors
n1ore efficiently. Jack Kilby at Texas Instrun1ents and Bob Noyce at Fairchild Sen1iconductor
independently developed ways to package transistors togetller on a single substrate, or chip,
and this led the ,vay for further miniaturization as several transistors could be packaged
together onto a single piece of silicon. This integrated circuit (IC), as it becan1e kno,vn, fur-
ther reduced 1nanufacturing costs, reduced the size required for electronic circuits related
to co111puting, and allowed for mass production of
FIGURE 1-15 The Intel 4004 4-bit CPU chip (1971) co1nn1on building blocks for computers. For exan1ple,
the NE555 tin1er chip, a siinple circuit tllat provides
precise clock signals on a signal chip, first appeared
in 1972 and continues to be manufactured today, with
over 1 billion of the devices sold each year.
Around the sa111e time, in 1971, Intel 111arketed
the first n1icroprocessor, the 4004 chip (Figure 1-15),
that included all the circuitry necessary for gener-
al-purpose calculations, i1nplen1ented ,vith just over
2,000 transistors. This ,vas the birth of what we now
consider the n1odern era of co1nputing.
Even those advances pale in con1parison to ,vhat has
been done since. Early Intel calculator chips comprised
Chapter 1 A Short History of Computation I 11

FIGURE 1-16 Moore's Law fitted to devices from 1971 to 2011

Microprocessor Transistor Counts 1971-2011 & Moore's Law

2,600,000,000
1,000,000,000

100,000,000
... .
-
c
:::,
10,000,000
curve snows trao$i$1or
count doubling every
two years
...
f'«llllffl lll
~}.mll
0
<.> .......
e AU>o<s

1,000,000 ...
..,.

..,...
..,.. .
100,000
..... ......
.,,, .....
10,000 ...
eceo,
J • 280

$X19• 1 • .W0Se601
2.300 _.OCM • RCA 1802

1971 1980 1990 2000 2011

Date of introduction

just a fe,v hundred individual transistors packed together onto a single integrated circuit chip,
but by the late 1970s that number was approaching 50,000 transistors. In the 1980s Intel con -
tinued to push the boundaries of how 1nany tran sistors could be packed onto a single chip
such that by 1989, the 80486 CPU chip broke the l -n1illion-transistor boundary. In 2000 the
Pentium 4 reached 42 1nillion tran sistors, an d in 2016 Intel's Core i7 Broad\vell CPU chips
packed 3.4 billion transistors onto a chip about half an inch on a side. Large-scale integration
(LSI) and very large-scale integration (VLSI) have been on a pace for the past 40 years of
doubling th e number of transistors packed into integrated circuits while at the sa1ne time
reducing the price of the circuits (Figure 1-16). Gordon Moore, cofounder of Intel, 1nade this
observation (soon after dubbed "Moore's La\v") in 1965; so far it is held up for nearly 50 years.
The questioning in circuit design these days is whether Moore's Law ,vill continue to hold
up - ,ve are starting to reach th e physical boundaries of shrinking circuits. The individual
"wires" on an integrated circuit, typically n1ade of alun1inun1, are approaching th e \vidth
of just a few aton1s, and it's unclear whether new technologies under develop1nent now
\Vill be able to push this boundary even further to the subato1nic reahn.

The Personal Computer


As the integrated circuits mak ing up computers became n1ore po,verful and less expensive
in the 1970s, \Ve started to see the design and manufacture of computers that were not
12 I Introduction to Computer Science

targeted at military, academic, or business applicat ions, but rather directly at consum-
ers. These ho1ne con1puters, or personal computers as they beca1ne kno\vn, \Vere at first
extremely expensive, but as their popularity grew, and manufacturing costs decreased
as voltunes increased, their prices dropped to the point where it was very common for
any given household to have at least one con1puter in it. Around th is tin1e Bill Gates and
Paul Allen founded Microsoft, developing a BASIC language interpreter for one of the
very first personal con1puters fro1n Altair; in 1977 Steve Wozniak and Steve Jobs founded
Apple Computer in Jobs's garage, and in 1980 IBM introduced the IBM PC, cen1enting that
tenn in the annals of history; that original PC included an operating syste1n developed
by Microsoft and licensed back to IBM. In 1984 Apple countered with its o\vn personal
co1nputer, the Macintosh, based on early work that Jobs had done at a co1npany called
NextStep, and building on the success of the Apple II computer. The Macintosh introduced
a n1odern graphical user interface, including \Vindows and a mouse for input, which had
been prin1arily developed at Xerox at their Palo Alto Research Center (PARC).

What's Next?
From a computer architecture standpoint, not much has changed since 1984. Co1nputers
have becon1e s1naller, faster, and less expensive, but the underlying design is unchanged.
The next big thing in computing seems to be the nehvork. Even more so than computing,
the net\vork has becon1e a 1najor disrupter of industries and businesses that have existed
for hundreds of years. In just the past 10 years we've moved from a world where 1nusic
\Vas something that you purchased at a record store to a \vorld where n1usic is all around
us, streaming constantly, \Vith 1nillions upon millions of songs available on demand
wherever we are. We wear computers on our wrist that not only talk to us but link with
satellites to pinpoint our location anywhere on Earth to just a few feet . The network has
beco1ne the computer, and the laptops and desktops and phones have beco1ne just a way
to access that universal con1puter.
Just as the technologies of the 1800s gave way to the Industrial Revolution and the incredible
advances of the 1nid-1900s, so it is no\v with the astonishing pace of develop1nent and inno-
vation that we're seeing in the 2000s, pri1narily driven by ubiquitous, powerful co1nputing
resources. As Clarke predicted, our technology is practically indistinguishable fron1 1nagic.

Bottom Line
We have become so used to having access to incredible computational resources, but it
is sobering to look back on those early atten1pts at co1nputation; sticks and stones, gears
and stea1n engines, all driving toward the sa1ne goal; the reality is that the techniques
that we use now for con1putation really are not 1nuch different fron1 those that have been
used for thousands and thousands of years. We compute faster, ,ve store more information,
and we are more dependent on con1putation than ever before, but the foundations of the
con1puters that are ubiquitous in our lives now were laid down in prior centuries, and it
seems unlikely that we will 1nove on to a different path anytime soon.
Chapter 1 A Short History of Computation I 13

Figure Credits
• Fig. 1.1: Copyright © Evan-Amos (CC BY-SA 3.0) at https:/lcomm ons.wikimedia.org/wiki/File%3AHu-
man-Hands-Front-Back.jpg.
• Fig. 1.2: Source: https:/lcommons.wikimedia.org/w/index.php?curid=82 J J29.
• Fig. 1.3: Copyright © Piotrus (CC BY-SA 3.0) at https:/lcommons.wikimedia.org/w/index.php?cu-
rid=4059562.
• Fig. 1.4: Copyright © Diego Delso (CC BY-SA 3.0) at https:l/commons.wikimedia.org/wiki/File%3A-
Stonehenge%2C_Condado_d e_Wiltshire%2C_Inglaterra%2C_20 J4-08- J2%2C_D D_ 09.JPG.
• Fig. 1.5: Copyright © Mogi Vicentini (CC BY-SA 3.0) at https:/lcommons.wikimedia.org/w/index.php?cu-
rid=2523740.
• Fig. 1.6: Copyright © Rama (CC BY-SA 3.0 FR) at https:/lcommons.wikimedia.org/w/index.php?cu-
rid=53246694.
• Fig. 1.7: Source: https:/lcommons.wikimedia.org/w/index.php?curid=J J84856.
• Fig. 1.8: Copyright © Bruno Barra! (CC BY-SA 2.5) at https:/lcommons.wikimedia.org/w/index.php?cu-
rid=6839854.
• Fig. 1.9: Copyright © Teslaton (CC BY-SA 3.0) at https:/lcommons.wikimedia.org/w/index.php?cu-
rid=367 J787.
• Fig. 1.10: Copyright © Venusianer (CC BY-SA 3.0) at https:/lcommons.wikimedia.org/wiki/File%3AZ3_
Deutsches_ Museum.)PG.
• Fig. 1.11: Copyright © RJB I (CC BY-SA 4.0) at https:l/commons.wikimedia.org/wiki/File%3ATriody_var.
jpg.
• Fig. 1.12: Source: https:l/commons.wikim edia.org/wiki/File%3AEniac.jpg.
• Fig. 1.13: Copyright © Kapooht (CC BY-SA 3.0) at https:/lcommons.wikimedia.org/wiki/File%3AVon_
Neumann_Architecture.svg.
• Fig. 1.14: Source: https://commons.wikim edia.org/wiki/File%3AKath erineJohnson_at_NASA%2C_
in_ J966.jpg.
• Fig. 1.15: Copyright © Thomas Nguyen (CC BY-SA 4.0) at https:1/commons.wikimedia.org/wiki/
File%3Alntel_C4004_b.jpg.
• Fig. 1.16: Copyright © Wgsimon (CC BY-SA 3.0) at https:l/commons.wikimedia.org/wiki/File%3ATran-
sistor_Count_and_ Moorc's_ Law_-_20 11.svg.
CHAPTER

Numbers and Bases

our co inputer isn't very s1nart. We like to think computers are sn1art; after all, they

Y can land a tiny probe on a comet hurtling through space, keep people alive with
sophisticated medical applications, and even drop an angry bird onto a pile of
th ieving pigs. But in reality, the co1nputer hardware is capable of only performing a very
few operations. It deals exclusively in numbers, not pigs or birds, and it can add nun1bers
together, move those numbers from one place to another in its men1ory, and shift nun1bers
to the right or to the left. That's about it.
This makes sense \Vhen you recall ho\v we got fro1n Jacquard's loom to 1nodern-day
n1achines. The early con1puters were designed to solve 1nathematical problen1s, such as the
equations used to predict the path of a mortar shell on the battlefield or the tabulations
needed for the federal census. These \Vere numeric proble1ns that resulted in machines that
could do math. Even after Von Netunann described the require1nents for a general-pur-
pose computer in his 1945 paper, t he underlying mechanism of \Vorking with numbers
re1nained unchanged.
Here's the problem, though. When you and I think of a nu1nber, \Ve treat it as, well, a
number. Take 42. What makes it 42? What is the essence of 42-ness that n1akes it different
from 41 or 43? In our minds we understand \vhat numbers represent and we're capable of
doing son1e pretty a1nazing things \Vith those concepts. While \Ve often talk about the com-
puter having a "brain" of sorts, in reality the arithmetic processing unit is just a collection
of s\vitches, very similar to the light s\vitches on your wall. The s\vitch can be either on or
off. How can we relate a switch like that to the concept of the number 42? That's the problen1
we want to solve in this chapter. In getting to the solution, \ve'll look at four different ways
to represent nun1bers: deci1nal, binary, octal, and hexadeci1nal.

What a Number Is
Before we can solve this problen1 \Ve need to pause and consider \Vhat a number really is.
The nu1nber 42 is an integer, or counting nu1nber. We could lay out 42 marshmallows on

15
16 I Introduction to Computer Science

a table and proudly say, "There, that's forty-t\vo things. Any questions?" Counting, or
measuring, or weighing things gives us some result that we express as a ntunber.
When we write the nu1nber 42 down on a piece of paper, \Ve are using a standard nota-
tion to represent the 42 1narsh1nallo\vs on the table. You probably haven't thought much
about this since third grade, but we write syn1bols like 4 and 2 in a specific order so that
we can effectively co1nmunicate nun1eric inforn1ation. The fonnat that we use in n1ost of
our daily co1n1nunications is called decimal. The English word decimal co1nes fron1 the
Latin decin1us, 1neaning tenth, and so decimal numbers use units of ten. While we are
most fa1niliar with decin1al numbers, there are several other formats in con11non use in
technical and scientific fields.

Using Exponents
Before \Ve dive into the various formats we can use to represent numbers, \ve'll need a
refresher on exponential notation. An exponent is the little number that \Ve write above
and to the right of a number to indicate that \Ve want to 1nultiply the number with itself
a certain nu1nber of times. For example, when we write 5•, \vhat we're really saying is 5 x
5 x 5 x 5. We say, "five raised to the fourth power," or just, "five to the fourth." Likewise,
"three to the fifth" is 35, or 3 x 3 x 3 x 3 x 3.
A number raised to the "zero" power is defined to be t he nu1nber l. So, 5° = l , and
4,765,442° = 1. Similarly, a nun1ber raised to the "first" power is defined to be the nun1ber
itself; 31 =3, 421 =42, and so on.

Symbols, Numbers, and Bases


We use symbols as a way to represent numbers, and each numbering system uses its own
set of symbols. We use the term base to indicate how n1any sy1nbols are being used. Dec-
in1al nu1nbers, for exa1nple, are base 10 and use 10 syn1bols: 0, l, 2, 3, 4, 5, 6, 7, 8, and 9.
A single decin1al nun1ber can be any of ten values. Binary numbers are base 2 and use hvo
sy1nbols: 0 and 1. A single binary number can be either of those two values.
We now have the tools we need to tackle deci1nal numbers and any other nun1bering
systen1 \Ve ,night be interested in.

Decimal Numbers
Let's return to our good friend, the nu1nber 42. When we write it down, we first jot down
the 4 and then the 2 to the right of the 4. This very specific arrangement lets us represent
the value in decin1al, or po,vers-of-ten notation. Each nun1ber, from right to left, represents
quantities of a po\ver of ten. We start on the right with 10°; the next colu1nn to the left is
101, the column to the left of that is 102 , and so on. We say that we are working in base 10
or deci1nal. It looks like this:

1113 1112 101 100


4 2
Chapter 2 Numbers and Bases I 17

What ,ve're really indicating is that ,ve have 4 of the 101 units, and 2 of the 10° units,
and we can add the1n up:

(4 x 101) + (2 x 10°) = (4 x 10) + (2 x 1) = 42

Let's try another example. We'd ,vrite the number 4,096 like this:

11t1 1112 101 111'


4 0 9 6

(4 x 103) +(O x H)2) + (9 x 101) + (6 x 10°) = (4 x 1000) + (20 x 100) + (9 x 10) + (6 x 1) = 4,096

We do these steps auton1atically in our heads ,vhen we FIGURE 2-1 Decimal 924
work with decimal numbers. The co1nputer hardware,
though, can't deal at all ,vith decin1al numbers; its circuits
102 10 1 10 0
can only 1nange to be either on or off. Fortunately there's
an easy way to solve this problem: The co1nputer ,vorks
in powers of2 rather than po,vers of 10. 9 2 4
Here's another way to look at decin1al ntunbers. Figure
2-1 shows how the nu1nber 924 is represented as a sum 9 x 102 + 2 x 101 + 4 X 100
of powers of 10.
9 X 100 + 2 X 10 + 4X 1

Binary Numbers
900 + 20 + 4
Deci1nal numbers use ten sy1nbols, 0, l, 2, 3, 4, 5, 6, 7,
8, and 9, to represent values. When we represent values
using po,vers of 2, there are only two syn1bols available: 924
O and 1. A one might represent t he "on" condition of a
s,vitch and zero the "off" condition. Maybe someday someone will invent a con1puter that
uses dimn1er switches ,vith 1nany values between on and off, but for now ,ve're stuck with
this either-or, or binary, arrange1nent.
You might th ink that being limited to just t,vo symbols would not be all that useful,
but nearly every electronic device that we use has at its heart hardware that operates
exclusively on binary nu1nbers.
Just as we did ,vith deci1nal numbers, we can write out values expressed in po,vers of
two. For exa1nple, the deci1nal ntunber 42 looks like th is in binary:

21 2s 2s 2' Z3 22 2' 20
0 0 1 0 1 0 1 0
Another random document with
no related content on Scribd:
“How do you mean?” “How? why, by taking the same steps you did
yourself,” said the youth.
I was invited, with my colleagues, to pass a day about five miles
from Tripoli, at the garden of Mahomed D’Ghies, to whom I brought
letters from his son, who was residing in London, much noticed and
respected. This old gentleman had been minister for foreign affairs to
the bashaw, but had retired from office some time, on account of a
complaint in his eyes. He is a most respectable man, and particularly
kind to all European travellers who visit Tripoli; and so well known
throughout Northern Africa, that letters of credit from him are sure to
be duly honoured. Nothing could exceed the hospitality and attention
with which we were received: having regaled ourselves with sherbet,
coffee, and tobacco, several times in the course of the day, and
partaken of an excellent dinner, à la Turque, in a grove of lemon and
orange trees, we returned in the evening to Tripoli, well pleased with
our day’s excursion.
Tripoli has been so often described, that I shall pass it over in
silence. Its Jews, its Arabs, its Moors, and Maraboots; the slave
population, and the bashaw’s family; are all so well painted to the life
in “Tully’s Letters,” as to require no further notice from me as a
casual visitor. Neither is it my intention to enter into a minute
description of the country between Tripoli and Mourzuk; the surface
of which is not essentially different from that between Mourzuk and
Bornou, and has already been noticed by Captain Lyon, and in the
communications to the African Association.
On the 5th March, 1822, I left Tripoli for Benioleed[1], to join my
two companions, who had proceeded thither with our servants,
horses, camels, and baggage. They had gone on to Memoom, a
very pretty valley, which, at this season of the year, was green with
herbage, and adorned by flowers of various hues and colours, richly
scattered in beautiful disorder;—but it was the last of the kind we
were fortunate enough to meet with between this place and Bornou;
and here the consul and his son, who had accompanied us from
Tripoli, took their leave, with many hearty good wishes for our
success and prosperity.
Drawn by Major Denham. Engraved by E. Finden.

PART OF THE STONY DESERT.


NEAR SOCKNA.
Published Feb. 1826, by John Murray, London.

On the day previous to our approach to Sockna, a town about half


way between Tripoli and Mourzuk, which we reached in fourteen
days, the uniformity of the journey was somewhat enlivened, by
meeting with a kafila of slaves, from Fezzan, in which were about
seventy negresses, much better looking, and more healthy, than any
we had seen near the sea-coast. They were marching in parties of
fifteen or twenty; and on our inquiring of one of those parties from
whence they came, the poor things divided themselves with the
greatest simplicity, and answered, “Soudan, Begharmi, and Kanem,”
pointing out the different parcels, from each country, as they spoke:
those from Soudan had the most regular features, and an expression
of countenance particularly pleasing.
Passing a small wadey and plantation of date trees, we had soon
a view of Sockna, and were met on the plain, on which it stands, by
the governor and principal inhabitants, accompanied by some
hundreds of the country people, who all crowded round our horses,
kissing our hands, and welcoming us with every appearance of
sincerity and satisfaction; and in this way we entered the town: the
words “Inglesi! Inglesi!” were repeated by a hundred voices from the
crowd. This, to us, was highly satisfactory, as we were the first
English travellers in Africa who had resisted the persuasion that a
disguise was necessary, and who had determined to travel in our
real character as Britons and Christians, and to wear, on all
occasions, our English dresses; nor had we, at any future period,
occasion to regret that we had done so. There was here no jealousy,
nor distrust of us as Christians; on the contrary, I am perfectly
satisfied that our reception would have been less friendly had we
assumed a character that could have been at best but ill supported.
In trying to make ourselves appear as Mussulmans, we should have
been set down as real impostors.
The dates of Sockna are excellent, and in abundance: our
animals were liberally supplied with this fruit of fruits; and after the
first two days appeared to eat them nearly as well as corn. The
population of Sockna must be considerably more than three
thousand. The town is walled, and about a mile in circumference:
has eight gates; and wears altogether a clean and neat appearance
that surprised us. The women are certainly very pretty, and are said
to be remarkable for their love of intrigue. This may be true, or not;
but we had no opportunity of ascertaining it from our own knowledge.
Of their affability and good humour, however, we had many proofs;
and while only two of us were walking through the town one morning,
with a little army of ragged boys following us, two, of rather the better
order, quickly dispersed them; and invited us to enter a house,
saying that a mara zene (a beautiful woman) wished to see us. We
put ourselves under their guidance, and entering a better sort of
dwelling-house, were quickly surrounded by at least half-a-dozen
ladies, most of them aged; but who asked us a thousand questions,
and, when satisfied we were not dangerous, called several younger
ones, who appeared to be but waiting for permission to appear. Our
dresses and ourselves were then minutely examined. The yellow
buttons on our waistcoats, and our watches, created the greatest
astonishment; and a pair of loose white trowsers that I wore, into the
pockets of which I accidentally put my hands, raised their curiosity to
a wonderful degree: my hands were pulled out, and those of three or
four of the ladies thrust in, in their stead: these were replaced by
others, all demanding their use so loudly and violently, that I had
considerable difficulty in extricating myself, and was glad to make my
escape. The dress of the Sockna women is nearly that of the
Tripoline: they wear striped shirts, of silk or linen, large silver ear-
rings, with leg-lets and arm-lets of the same: the lower classes wear
those of glass or horn.
The remaining half of our journey to Mourzuk was over pretty
nearly the same kind of surface as that we had passed before; in
some places worse. Sometimes two, and once three days, we were
without finding a supply of water; which was generally muddy, bitter,
or brackish: nor is this the worst that sometimes befalls the traveller.
The overpowering effects of a sudden sand-wind, when nearly at the
close of the desert, often destroys a whole kafila, already weakened
by fatigue; and the spot was pointed out to us, strewed with bones
and dried carcasses, where the year before fifty sheep, two camels,
and two men, perished from thirst and fatigue, when within eight
hours’ march of the well which we were anxiously looking out for.
Indeed the sand-storm we had the misfortune to encounter in
crossing the desert gave us a pretty correct idea of the dreaded
effects of these hurricanes. The wind raised the fine sand with which
the extensive desert was covered, so as to fill the atmosphere, and
render the immense space before us impenetrable to the eye
beyond a few yards. The sun and clouds were entirely obscured, and
a suffocating and oppressive weight accompanied the flakes and
masses of sand, which, I had almost said, we had to penetrate at
every step. At times we completely lost sight of the camels, though
only a few yards before us. The horses hung their tongues out of
their mouths, and refused to face the torrents of sand. A sheep, that
accompanied the kafila, the last of our stock, lay down on the road,
and we were obliged to kill him, and throw the carcass on a camel. A
parching thirst oppressed us, which nothing alleviated. We had made
but little way by three o’clock in the afternoon, when the wind got
round to the eastward, and refreshed us something: with this change
we moved on until about five, when we halted, protected a little by
three several ranges of irregular hills, some conical, and some table-
topped. As we had but little wood, our fare was confined to tea; and
we hoped to find relief from our fatigues by a sound sleep. That was,
however, denied us; the tent had been imprudently pitched, and was
exposed to the east wind, which blew a hurricane during the night:
the tent was blown down, and the whole detachment were employed
a full hour in getting it up again; and our bedding and every thing that
was within it was, during that time, completely buried by the constant
driving of the sand. I was obliged, three times during the night, to get
up for the purpose of strengthening the pegs; and when, in the
morning, I awoke, two hillocks of sand were formed on each side of
my head, some inches high.
On the 7th April we arrived at a village in the midst of a vast
multitude of palm trees, just one day’s journey short of Mourzuk. As it
was to be the last day’s march, we were all in good spirits at the
prospect of rest; and had we made our arrangements with judgment,
every thing would have gone on well. We had, however, neglected
sending on to advise the sultan of our arrival—a constant practice,
and consequently our reception was not what it ought to have been.
We arrived at D’leem, a small plantation of date trees, at noon, and
finding no water in the well, were obliged to proceed; and it was
three in the afternoon before we arrived at the wells near Mourzuk.
Here we were obliged to wait until the camels came up, in order that
we might advance in form. We might, however, have saved
ourselves the trouble:—no one came out to meet us, except some
naked boys, and a mixture of Tibboos, Tuaricks, and Fezzanese,
who gazed at us with astonishment, and no very pleasant aspect.
We determined on not entering the town in a manner so little
flattering to those whom we represented: and retiring to a rising
ground, a little distance from the gates of the town, waited the return
of a chaoush, who had been despatched to announce our arrival.
After half an hour’s delay, the sheikh El Blad (the governor of the
town) came out, and, in the sultan’s name, requested we would
accompany him to the house which had been prepared for us; and
he added, to our great surprise, the English consul is there already.
The fact was, a very ill-looking Jew servant of mine, mounted on a
white mule, with a pair of small canteens under him, had preceded
the camels, and entered the town by himself: he was received with
great respect by all the inhabitants—conducted through the streets
to the house which was destined to receive us; and from the
circumstance of the canteens being all covered with small brass
shining nails, a very high idea of his consequence was formed. He
very sensibly received all their attentions in silence, and drank the
cool water and milk which was handed to him: and we always had
the laugh against them afterwards, for having shown so much civility
to an Israelite—a race they heartily despise. “We thought the
English,” said they, “were better looking than Jews—Death to their
race! but then God made us all, though not all handsome like
Mussulmans, so who could tell?” As we were all this time exposed to
a burning sun, we were well inclined to compromise a little of our
dignity, and determined on entering the town, which we did by the
principal gate. The walls are well built, at least twenty feet high; and
the gate sufficiently wide to admit, with care, a loaded camel. You
pass through the fsug, slave-market, a wide street, with houses on
each side, three hundred yards in length. It leads into an open
space, in the centre of which the castle stands, surrounded by a
second wall. In the inside of this inner wall, in the castle yard, are a
few houses, originally built for the Mamelukes, and particular
followers of the late sultan, when they were subject to the occasional
attacks of the Arabs. In one of these, the house occupied by the late
Mr. Ritchie and Captain Lyon, arrangements were made for our
reception. Almost as soon as the camels were unloaded, we paid our
respects to the sultan: he received us with a great deal of affability
and good nature, and made an impression in his favour, which,
however, his subsequent conduct tended but little to strengthen.
Drawn by Major Denham. Engraved by E. Finden.

CASTLE AT MOURZUK.
FROM MR. RITCHIE’S GRAVE.
Published Feb. 1826, by John Murray, London.

Our interview with the sultan of Mourzuk was any thing but
encouraging: he told us that there was no intention, as we had been
led to expect, of any expedition to proceed to the southward for
some time to come; that an army could only move in the spring of
the year; that the arrangements for moving a body of men through a
country where every necessary must be carried on camels, both for
men and horses, were so numerous, that before the following spring
it was scarcely possible to complete them: that two camels were
required for every man and horse, and one for every two men on
foot. And as to our proceeding to Bornou, it would be necessary, had
the bashaw instructed him to forward us, that we should be
accompanied by an escort of two hundred men. He said he would
read to us the bashaw’s letter, and we should see the extent to which
he could forward our wishes. The letter was then handed to his fighi,
or secretary; and we found that to the protection of the sultan of
Fezzan were we intrusted, who was to charge himself with our
safety, and so insure our being treated with respect and attention by
all his subjects; that we were to reside at Sebha, or Mourzuk, or
where we chose in the kingdom of Fezzan, and to await his return
from Tripoli. With this our audience ended, and we returned to our
habitation.
It is quite impossible to express the disheartening feelings with
which we left the castle. The heat was intense; the thermometer at
97° in the coolest spot in the house, during the middle of the day;
and the nights were scarcely less oppressive: the flies were in such
myriads, that darkness was the only refuge from their annoyance. All
poor Mr. Ritchie’s sufferings and disappointments were brought to
our recollections; and although, from the arrangements which we
had been able to make, we were better provided with necessaries
than those who had gone before us,—yet did we consider our stock
as a very sacred charge, applicable only to the grand objects of our
expedition.
We received visits from all the principal people of Mourzuk the
day after our arrival; and remarking a very tall Tuarick, with a pair of
expressive, large, benevolent-looking eyes, above the black mask
with which they always cover the lower part of their face, hovering
about the door, I made signs to him to come near, and inquired after
Hateeta, the chief Captain Lyon had spoken so highly of, and for
whom, at his request, I was the bearer of a sword. To my great
surprise, striking his breast, he exclaimed, “I am Hateeta! are you a
countryman of Said[2]?—how is he? I have often longed to hear of
him.” I found Hateeta had been but once in Mourzuk since Captain
Lyon’s departure, and was now only to remain a few days. On the
following morning he came to the house, and the sword was
presented to him. It would be difficult to describe his delight; he drew
the sword and returned it, repeatedly; pressed it to his breast,
exclaimed “Allah, Allah!” took my hand, and pressing it, said “Katar
heyrick yassur yassur” (thank you very very much); nearly all the
Arabic he could speak. It was shortly reported all over the whole
town, that Hateeta had received a present from Said, worth one
hundred dollars.
12th.—We had been several times visited, and our hopes and
spirits raised, by a person called Boo-Bucker Boo-Khaloom. He said
that it was in the sultan’s power to send us on to Bornou if he
pleased: he even hinted that a bribe for himself might induce him to
do so—this, however, we found was not the case. Boo-Khaloom was
represented to us, and truly, as a merchant of very considerable
riches and influence in the interior. He was on the eve of starting for
Tripoli, with really superb presents for the bashaw. He had five
hundred slaves, the handsomest that could be procured, besides
other things. He stated to us, secretly, that his principal object in
going to Tripoli was to obtain the removal of the present sultan of
Fezzan; and wished that we should make application to the bashaw
for him to accompany us farther into the interior: we were not,
however, to hint that the proposition had come from him. Boo-
Khaloom said that he should be instantly joined by upwards of one
hundred merchants who waited but for his going, and no further
escort would be necessary; that he should merely remain a few
weeks in Tripoli, and, on his return, we could instantly move on. The
substance of all these conversations was transmitted to Colonel
Warrington.
Boo-Khaloom left Mourzuk for Tripoli, with his slaves and
presents; loading upwards of thirty camels, apparently reconciled to,
and upon good terms with, the sultan. It was, however, very well
known that Sultan Mustapha had set every engine at work to have
Boo-Khaloom’s head taken off on his arrival in Tripoli; and that the
other was willing to sacrifice all he was worth to displace and ruin
Mustapha in the bashaw’s favour.
It was not till the 18th, that the sultan, after attending the mosque,
started for Tripoli; all his camels and suite had marched in divisions,
for three days previous,—in slaves he had alone more than one
thousand five hundred. He was attended by about ten horsemen, his
particular favourites, and four flags were carried before him through
the town. The inhabitants complained dreadfully of his avarice, and
declared that he had not left a dollar, or an animal worth one, in all
Fezzan.
Nothing was now to be done but to make our arrangements for a
favourable start the following spring. By the sultan’s departure, every
necessary for our proceeding was withdrawn from the spot where we
were. Not a camel was to be procured, and every dollar, that he
could by any means force from his subjects, was forwarded to
Tripoli. To Tripoli, therefore, were we to look for supplies of every
kind; and it was decided by us all, that my departure had better
follow his as soon as possible.
In pursuance of our determination to represent to the bashaw of
Tripoli how necessary it was that something more than promises
should be given us for our sterling money, on Monday, the 20th May,
I left Mourzuk, with only my own negro servant Barca, three camels,
and two Arabs; and, after a most dreary journey of twenty days, over
the same uninteresting country I had already traversed,—the more
dreary for want of my former companions,—I arrived at Tripoli on the
12th June, where I was received by the consul with his usual
hospitality and kindness, and he assigned me apartments in the
consulate.
12th.—I requested an immediate audience of the bashaw, which
in consequence of the Rhamadan was not granted me until the
following evening. The consul, Captain Smyth of the navy, and
myself, attended: I represented, in the strongest terms, how greatly
we were disappointed at the unexpected and ruinous delay we had
experienced in Mourzuk, and requested a specific time being fixed
for our proceeding to Bornou; stating, also, that were the answer not
satisfactory, I should proceed forthwith to England, and represent to
the government how grievously we had been deceived. The bashaw
denied having intentionally broken his word, and solemnly declared
that the will of God, in visiting the sultan of Fezzan with sickness,
had alone prevented our being now on the road to Bornou.
A voyage to Marseilles, on my way to England, was the
consequence of our altercation with the bashaw; and the
promptitude with which it was decided upon, and carried into effect,
by means of a small French vessel which, at the time, most
fortunately lay in the harbour, was not without its good effects. The
bashaw sent three despatches after me, by three different vessels,
to Leghorn, Malta, and the port I had sailed to, which I received in
quarantine, informing me, that Boo-Khaloom was appointed with an
escort to convey us forthwith to Bornou. This was every thing I
wished for; and immediately re-embarking, a seven days’ passage
brought me once more to the shores of Barbary. Boo-Khaloom and
part of the escort were already at the entrance to the desert; and on
the 17th of September we re-entered the pass of Melghra in the
Tarhona mountains. Hope and confidence had taken possession of
my mind, in the place of anxiety and disappointment; there was now
an air of assurance and success in all our arrangements; and I felt
my health and spirits increase with this conviction. But little beyond
the casualties attendant on desert travelling occurred, previous to
our arriving again at Sockna, which we did on the 2d of October.
I found the great failing of my friend, Boo-Khaloom, was pomp
and show; and feeling that he was, on this occasion, the bashaw’s
representative, he was evidently unwilling that any sultan of Fezzan
should exceed him in magnificence. On entering Sockna, his six
principal followers, handsomely attired in turbans and fine barracans,
and mounted on his best horses, kept near his person, whilst the
others, at a little distance, formed the flanks. I rode on his right hand,
dressed in my British uniform, with loose Turkish trowsers, a red
turban, red boots, with a white bornouse over all, as a shade from
the sun; and this, though not strictly according to order, was by no
means an unbecoming dress. Boo-Khaloom was mounted on a
beautiful white Tunisian horse, a present from the bashaw, the peak
and rear of the saddle covered with gold, and his housings were of
scarlet cloth, with a border of gold six inches broad. His dress
consisted of red boots, richly embroidered with gold, yellow silk
trowsers, a crimson velvet caftan with gold buttons, a silk benise of
sky blue, and a silk sidria underneath: a transparent white silk
barracan was thrown lightly over this, and on his shoulders hung a
scarlet bornouse with wide gold lace, a present also from the
bashaw, which had cost, at least, four hundred dollars; a cashmere
shawl turban crowned the whole. In this splendid array, we moved on
until, as we approached the gates of the town, the dancing and
singing men and women met us; and, amidst these, the shouts and
firing of the men, who skirmished before us, and the “loo! loo!” of the
women, we entered Sockna.
We found that houses were provided for us in the town; but the
kafila bivouacked outside the gates. It had always been our intention
to halt at Sockna, for three or four days; and here we expected to be
joined by a party of the Megarha Arabs, whom their sheikh, Abdi
Smud ben Erhoma, had left us, for the purpose of collecting together.
Hoon and Wadan were also to furnish us with another quota. My
house consisted of a court-yard eighteen feet square, and a small
dark room, leading out of it by two steps: the court, however, was the
greater part of the day shaded; and here, on a carpet, I received my
visitors. The Arabs, as they arrived, were all sent to me by Boo-
Khaloom; and their presentation has a form in it, not much in
character with their accustomed rudeness: they all came armed with
their long guns; and the same girdle which confines their barracan
contains also two long pistols. The chief enters, and salutes,
dropping on one knee, and touching the stranger’s right hand with
his, which he carries afterwards to his lips; he then says, “Here are
my men, who are come to say health to you.” On receiving
permission, they approached me, one by one, saluting in the same
manner as their chief, who continued to remain at my side: they then
sat down, forming a sort of semicircle round me, with their guns
upright between their knees; and, after a little time, on the sheikh
making a signal, they all quitted the presence.
Boo-Khaloom, who had suffered very considerably from fever,
cold, and ague, now became so seriously ill, that our departure was
of necessity postponed, and he insisted upon my prescribing for him,
saying, “he was quite sure that I could cure him, if it was the will of
God that he should live: if not, that nobody could.” His confidence in
me gave me some confidence in myself: but alone, with very few
medicines, and less skill, my situation was really one of great
anxiety; for no one could foresee what might have been the
consequence, had any thing serious happened to him while under
my hands. He became alarmingly ill, and for two days and nights I
had great doubts of his recovery; to my great satisfaction, however,
on the third morning, after a night of pain and delirium (and which I
had passed in watching by his side), a violent eruption appeared on
his skin, with some little moisture, produced by covering him up the
whole day with blankets, and suffering no one to come into the room
but his favourite female slave. By the evening, he became much
better.—Hajamad, or charms, are what the Arabs have most faith in,
when they are ill. All the fighis (writers) and maraboots in Sockna
were employed on this occasion by my friend’s friends, and one
night the tassels of his cap were literally loaded with them. He
assured me, when alone, that he had no faith in such things, and
smiled when he said his friends would think ill of him, were he to
refuse; his faith, however, was stronger than he chose to
acknowledge, and entering, unexpectedly, one morning, I found him
with a dove that had been just killed and cut open lying on his head,
which, as he assured me, was because a very great maraboot had
come from Wadan on purpose to perform the operation.
During our stay at Sockna, the marriage of the son of one of the
richest inhabitants, Hadgi Mohammed-el-Hair-Trigge, was celebrated
in the true Arab style. There is something so rudely chivalric in their
ceremonies (so very superior to the dull monotony of a Tripolitan
wedding), where from one to five hundred guests, all males,
assemble, covered with gold lace, and look at one another, from the
evening of one day until daylight the next, that I cannot help
describing them.
The morning of the marriage-day (for the ceremony is always
performed in the evening, that is, the final ceremony; for they are
generally betrothed, and the fatah read, a year before) is ushered in
by the music of the town or tribe, consisting of a bagpipe and two
small drums, serenading the bride first, and then the bridegroom,
who generally walks through the streets very finely dressed, with all
the town at his heels; during which time, the women all assemble at
the bride’s house, dressed in their finest clothes, and place
themselves at the different holes in the wall which serve as windows,
and look into the court-yard. When they are so placed, and the bride
is in front of one of the windows with her face entirely covered with
her barracan, the bridal clothes, consisting of silk shifts, shawls, silk
trowsers, and fine barracans, to show her riches, are hung from the
top of the house, quite reaching to the ground: the young Arab chiefs
are permitted to pay their respects; they are preceded from the
skiffa, or entrance, by their music, and a dancing woman or two
advances with great form, and with slow steps, to the centre of the
court, under the bride’s window: here the ladies salute their visitors,
with “loo! loo! loo!” which they return by laying their right hand on
their breasts, as they are conducted quite round the circle. Ample
time is afforded them to survey the surrounding beauties; and there
are but few, who, on these occasions, are so cruel as to keep the veil
quite closed. Such an assemblage of bright black eyes, large ear-
rings, and white teeth, are but rarely seen in any country, I should
suppose. After having made the circuit, the largess is given, and
exposed to view by the chief danseuse, and, according to its
amount, is the donor hailed and greeted by the spectators. Previous
to their departure, all visitors discharge their pistols, and then again
the ladies salute with the “loo! loo!” So far from being displeased at
my asking permission to pay my respects, they considered it as a
favour conferred; and the bridegroom, although he could not himself
be admitted, attended me to and from the house of his mistress. This
ceremony being ended, a little before sunset, the bride prepares to
leave her father’s house: a camel is sent for her with a jaafa[3], or
sedan chair of basket-work, on its back, covered with skins of
animals, shawls from Soudan, Cairo, and Timbuctoo: she steps into
this, and so places herself as to see what is going forward, and yet
to be entirely hid from the view of others. She is now conducted
outside the town, where all the horsemen and footmen who have
arms are assembled. Our escort on this occasion added greatly to
the effect, as they were all, by Boo-Khaloom’s order, in the field,
consisting of sixty mounted Arabs; and when they all charged and
fired at the foot of the bride’s camel, I really felt for the virgin’s
situation; but it was thought a great honour, and that, I suppose,
consoled her for the fright. They commenced by skirmishing by twos
and fours, and charging in sections at full speed, always firing close
under the bride’s jaafa: in this manner they proceeded three times
round the town, the scene occasionally relieved by a little interlude of
the bridegroom’s approaching the camel, which was surrounded by
the negresses, who instantly commenced a cry, and drove him away,
to the great amusement of the bystanders, exclaiming, “Burra! Burra!
be off! be off! mazal shouia! a little yet!” With discharges of musketry,
and the train of horsemen, &c. she is then conveyed to the
bridegroom’s house; upon which it is necessary for her to appear
greatly surprised, and refuse to dismount: the women scream, and
the men shout, and she is at length persuaded to enter; when, after
receiving a bit of sugar in her mouth from the bridegroom’s hand,
and placing another bit in his, with her own fair fingers, the ceremony
is finished, and they are declared man and wife.
A WOMAN OF SOCKNA.
Drawn by Captn. Clapperton. R.N. Engraved by E. Finden.

Published by John Murray, London. Feb. 1826.

We had now to pass the Gibel Assoud, or Black Mountains: the


northernmost part of this basaltic chain commences on leaving
Sockna. We halted at Melaghi, or the place of meeting immediately
at the foot of the mountain, the well of Agutifa; and from hence
probably the most imposing view of these heights will be seen. To
the south, the mountain-path of Niffdah presents its black
overhanging peaks, and the deep chasm, round which the path
winds, bearing a most cavern-like appearance: a little to the west,
the camel path, called El Nishka, appears scarcely less difficult and
precipitous; the more southern crags close in the landscape, while
the foreground is occupied by the dingy and barren wadey of Agutifa,
with the well immediately overhung by red ridges of limestone and
clay: the whole presenting a picture of barrenness, not to be
perfectly described, either by poet or painter.
Large masses of tabular basalt, and irregular precipices, common
to this formation, are scattered over this range of hills, and extend
over all the plains which environ them. The most lofty hills are those
which present the most massive façades of tabular basalt; the sides
sometimes exhibit a step-like appearance, and in many instances
are overhung by pillars, curved, inclined, and perpendicular: these
produce a singular effect, not devoid of grandeur. The lower stratum
of all these hills is invariably limestone, mixed with a reddish clay.
Hills of the same are found bordering upon, and in some cases
joining, the basaltic ones; some of these are strewed over with a
covering of basalt stones of various sizes and forms, none of them
large, from three to eighteen inches in circumference, but still
showing the colour and structure of the soil on which they are
spread. Other hills of limestone are also indiscriminately found
without the slightest particle of basalt on them, although in the
immediate vicinity of what could easily be imagined the ancient
crater of a volcano, which had showered a sombre covering heaved
from the very bowels of the earth, on all the then existing hills and
plains which surrounded it. Some of these limestone hills have been
cut through, either by the falling of masses of rock from the higher
hills, or by violent watercourses; and a section of them reveals
nothing but pure limestone mixed with clay.
The Souda, or Gibel Assoud[4], extend from north to south, three
days’ journey, but in so winding a direction, as not to exceed thirty-
five miles at the utmost in a straight line: to the west, as far as the
well called Assela, on the road to the Shiati, where the red clay hills
continue alone, and join the hills at Benioleed: to the east, they
extend three days on the road to Zella, or Bengagi, to a wadey called
Temelleen.
The first four days of our journey, after leaving Agutifa, were all
dreariness and misery. This was the third time that I passed these
deserts: but no familiarity with the scenery at all relieves the sense of
wretchedness which the dread barrenness of the place inspires. We
marched from dawn until dark, for the sake of getting over them as
quickly as possible; and as scarcely sufficient fuel was to be found to
boil a little water, a mess of cold tumuta was usually our supper. On
leaving Tingazeer, we had the blessing of a rainy day; for such it was
to all, but particularly to the poor negroes who accompanied the
kafila, although Boo-Khaloom always gave them to drink from his
skins once in the day (an unusual kindness), yet marching as they
were for twelve and fourteen hours, once scarcely satisfied nature. In
consequence of the rain, we found water fresh and pure during
almost every day’s march, and arrived at Zeghren[5] with the loss of
only one camel. On the last day, previous to arriving at the well,
Omhul Abeed, a skeleton of a man, with some flesh still hanging
about him, lay close to the road; but it was passed by the whole
kafila, with scarcely a remark.
After these dreary wastes, it was no small pleasure to rest a day
at Zeghren, the native town of a considerable merchant who
accompanied our kafila. When we first left Sockna for Mourzuk, Abdi
Zeleel had before taken me to his house, and presented me to his
mother and sister; and he now insisted on my taking up my quarters
there altogether. Almost the first person that presented herself was
my friend the merchant’s sister, I had almost said the fair, Omhal
Henna[6]. She had a wooden bowl of haleeb (fresh milk) in her hand,
the greatest rarity she could offer, and holding out the milk with some
confusion towards me with both her hands, the hood which should
have concealed her beautiful features had fallen back; as my taking
the milk from her would have prevented the amicable salutation we
both seemed prepared for, and which consisted of four or five gentle
pressures of the hand, with as many aish harlecks, and tiebs, and
ham-dulillahs, she placed the bowl upon the ground, while the
ceremonies of greeting, which take a much longer time in an African
village than in an English drawing-room, were, by mutual consent,
most cordially performed. I really could not help looking at her with
astonishment, and I heartily wish that I had the power of conveying
an idea of her portrait. It was the Jemma (Friday), the Sabbath, and
she was covered, for I cannot call it dressed, with only a blue linen
barracan, which passed under one arm, and was fastened on the top
of the opposite shoulder with a silver pin, the remaining part thrown
round the body behind, and brought over her head as a sort of hood,
which, as I remarked, had fallen off, and my having taken her hand
when she set down the milk had prevented its being replaced. This
accident displayed her jet black hair in numberless plaits all round
her expressive face and neck, and her large sparkling eyes and little
mouth, filled with the whitest teeth imaginable. She had various
figures burnt on her chin with gunpowder: her complexion was a
deep brown; and round her neck were eight or ten necklaces of coral
and different coloured beads. So interesting a person I had not seen
in the country; and on my remaining some moments with my eyes
fixed on her, she recommenced the salutation, “How is your health,”
&c. and smiling, asked, with great naiveté, “whether I had not learnt,
during the last two months, a little more Arabic.” I assured her I had.
Looking round to see if any body heard her—and having brought the
hood over her face—she said, “I first heard of your coming last night,
and desired the slave to mention it to my brother. I have always
looked for your coming, and at night, because at night I have
sometimes seen you: you were the first man whose hand I ever
touched—but they all said it did not signify with you, an Insara (a
Christian). God turn your heart!—but my brother says you will never
become Moslem—won’t you, to please Abdi Zeleel’s sister? My
mother says God would have never allowed you to come, but for
your conversion.” By this time, again the hood had fallen back, and I
again had taken her hand, when the unexpected appearance of Abdi
Zeleel, accompanied by the governor of the town, who came to visit
me, was a most unwelcome interruption. Omhal-henna quickly
escaped; she had, however, overstepped the line, and I saw her no
more.

You might also like