P r i n c i p l e Principles of s o f C Computer Science o m p u t e r S c i e n c e Salem Two University Plaza, Suite 310 PreSS Hackensack NJ 07601 Phone: 201-968-0500 Fax: 201-968-0511 Principles of Computer Science Principles of computer science_FM.indd 1 10/19/16 7:42 PM Principles of computer science_FM.indd 2 10/19/16 7:42 PM Principles of Computer Science Editor Donald R. Franceschetti, PhD The University of Memphis SALEM PRESS A Division of EBSCO Information Services, Inc. Ipswich, Massachusetts GREY HOUSE PUBLISHING Principles of computer science_FM.indd 3 10/19/16 7:42 PM Copyright © 2016, by Salem Press, a Division of EBSCO Information Services, Inc., and Grey House Publishing, Inc. All rights reserved. No part of this work may be used or reproduced in any manner whatsoever or transmitted in any form or by any means, electronic or mechanical, including photocopy, recording, or any information s torage and retrieval system, without written permission from the copyright owner. For permissions requests, contact [email protected]. ∞ The paper used in these volumes conforms to the American National Standard for Permanence of Paper for Printed Library Materials, Z39.48‑1992 (R2009) Publisher’s Cataloging-In-Publication Data (Prepared by The Donohue Group, Inc.) Names: Franceschetti, Donald R., 1947‑ editor. Title: Principles of computer science / editor, Donald R. Franceschetti, PhD, the University of Memphis. Description: [First edition]. | Ipswich, Massachusetts : Salem Press, a division of EBSCO Information Services, Inc. ; [Amenia, New York] : Grey House Publishing, [2016] | Series: Principles of | Includes bibliographical references and index. Identifiers: ISBN 978-1-68217-139-4 (hardcover) Subjects: LCSH: Computer science. Classification: LCC QA76 .P75 2016 | DDC 004—dc23 Printed in the United States of America Principles of computer science_FM.indd 4 10/19/16 7:42 PM Contents Publisher's Note . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii Deadlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Editor's Introduction . . . . . . . . . . . . . . . . . . . . . . . . ix Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Demon dialing/war dialing . . . . . . . . . . . . . . . . . . 102 Device drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 3-D printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Digital citizenship . . . . . . . . . . . . . . . . . . . . . . . . . 106 Agile robotics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Digital forensics . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 ALGOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Digital signal processors . . . . . . . . . . . . . . . . . . . . 110 Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Digital watermarking . . . . . . . . . . . . . . . . . . . . . . . 112 Android OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Dirty paper coding . . . . . . . . . . . . . . . . . . . . . . . . . 115 Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 DOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 Applied linguistics . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Drones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Architecture software . . . . . . . . . . . . . . . . . . . . . . . . 18 ASCII . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Electronic circuits . . . . . . . . . . . . . . . . . . . . . . . . . 122 Assembly Language . . . . . . . . . . . . . . . . . . . . . . . . . 23 Electronic communication software . . . . . . . . . . . 125 Autonomic computing . . . . . . . . . . . . . . . . . . . . . . 25 Electronic waste . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Avatars and simulation . . . . . . . . . . . . . . . . . . . . . . . 28 Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 BASIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Firewalls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Binary/hexadecimal representations . . . . . . . . . . . 34 Firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 Biochemical engineering . . . . . . . . . . . . . . . . . . . . 38 Fitbit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 Biomedical engineering . . . . . . . . . . . . . . . . . . . . . 40 FORTRAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Biometrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Functional design . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Biotechnology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Game programming . . . . . . . . . . . . . . . . . . . . . . . 145 C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Graphical user interface . . . . . . . . . . . . . . . . . . . . 147 CAD/CAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Graphics formats . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Cloud computing . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Green computing . . . . . . . . . . . . . . . . . . . . . . . . . . 152 Combinatorics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Communication technology . . . . . . . . . . . . . . . . . . 58 Information technology . . . . . . . . . . . . . . . . . . . . 154 CompTIA A+ certification . . . . . . . . . . . . . . . . . . . . 60 Integrated development environments . . . . . . . . 156 Computer animation . . . . . . . . . . . . . . . . . . . . . . . . 62 Intelligent tutoring system . . . . . . . . . . . . . . . . . . 159 Computer Circuitry: Flip flops . . . . . . . . . . . . . . . . 65 Internet privacy . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Computer Circuitry: Semiconductors . . . . . . . . . . 67 iOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 Computer memory . . . . . . . . . . . . . . . . . . . . . . . . . 69 Computer modeling . . . . . . . . . . . . . . . . . . . . . . . . 71 LISP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 Computer programming: Image editing . . . . . . . . 73 Computer programming: Music editing . . . . . . . . 76 Malware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 Computer programming: Video editing . . . . . . . . 78 Medical technology . . . . . . . . . . . . . . . . . . . . . . . . 172 Computer security . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Mesh networking . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Computer-assisted instruction . . . . . . . . . . . . . . . . . 83 Metacomputing . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 Connection machine . . . . . . . . . . . . . . . . . . . . . . . . 86 Microprocessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 Constraint programming . . . . . . . . . . . . . . . . . . . . . 87 Microscale 3-D printing . . . . . . . . . . . . . . . . . . . . . 183 Control systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 Mobile apps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 Mobile operating systems . . . . . . . . . . . . . . . . . . . 188 CPU design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Molecular Computers . . . . . . . . . . . . . . . . . . . . . . 190 Cryptography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Motherboards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 v Principles of computer science_FM.indd 5 10/19/16 7:42 PM Contents Principles of Physics Multiprocessing operating systems . . . . . . . . . . . .194 Software architecture . . . . . . . . . . . . . . . . . . . . . . .254 Multitasking operating systems . . . . . . . . . . . . . . .196 Software regulations . . . . . . . . . . . . . . . . . . . . . . .256 Multithreading operating systems . . . . . . . . . . . . .199 Software testing . . . . . . . . . . . . . . . . . . . . . . . . . . .259 Multitouch displays . . . . . . . . . . . . . . . . . . . . . . . .201 Software-defined radio . . . . . . . . . . . . . . . . . . . . .262 Multi-user operating systems . . . . . . . . . . . . . . . . .203 Speech-recognition software . . . . . . . . . . . . . . . . .264 Natural language processing . . . . . . . . . . . . . . . . .206 Turing machine . . . . . . . . . . . . . . . . . . . . . . . . . . .267 Networking: routing and switches . . . . . . . . . . . .208 Turing test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .270 Neural networks . . . . . . . . . . . . . . . . . . . . . . . . . . .211 Neuromorphic chips . . . . . . . . . . . . . . . . . . . . . . .214 Unicode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272 UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .275 Object-oriented design . . . . . . . . . . . . . . . . . . . . .217 Web design programming tools . . . . . . . . . . . . . .278 Parallel processors . . . . . . . . . . . . . . . . . . . . . . . . .220 Web graphic design . . . . . . . . . . . . . . . . . . . . . . . .281 Personal health monitor technology . . . . . . . . . .223 Windows operating system . . . . . . . . . . . . . . . . . .284 Personalized medicine . . . . . . . . . . . . . . . . . . . . . .226 Wireframes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .286 Privacy regulations . . . . . . . . . . . . . . . . . . . . . . . . .228 Wireless networks . . . . . . . . . . . . . . . . . . . . . . . . . .289 Programming languages . . . . . . . . . . . . . . . . . . . .230 Workplace monitoring . . . . . . . . . . . . . . . . . . . . . .292 PROLOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .233 Appendices Quantum computers . . . . . . . . . . . . . . . . . . . . . . .235 History of Events Leading up to the Quantum computing . . . . . . . . . . . . . . . . . . . . . . .238 Development of Modern Computers . . . . . . . . 295 Timeline of Microprocessors . . . . . . . . . . . . . . . . . 307 Random-access memory . . . . . . . . . . . . . . . . . . . .240 The Pioneers of Computer Science . . . . . . . . . . . 309 Removable memory . . . . . . . . . . . . . . . . . . . . . . . .242 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 Scaling systems . . . . . . . . . . . . . . . . . . . . . . . . . . . .245 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361 Signal processing . . . . . . . . . . . . . . . . . . . . . . . . . .248 Smart homes . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251 vi Principles of computer science_FM.indd 6 10/19/16 8:18 PM Publisher's note Salem Press is pleased to add Principles of Computer development of the first computers, an explana- Science as the fourth title in a new Principles of se- tion of analog versus digital computing, neural ries that includes Chemistry, Physics, Astronomy, and networks, the contributions of Alan Turing, and a Computer Science . This new resource introduces stu- discussion of how advances from vacuum tubes to dents and researchers to the fundamentals of com- digital processors have fundamentally changed the puter science using easy-to-understand language, way we live . giving readers a solid start and deeper understanding and appreciation of this complex subject . The book’s backmatter is another valuable resource and includes: The 117 entries range from 3D printing to Workplace Monitoring and are arranged in an A to Z order, • A timeline of the developments that related to making it easy to find the topic of interest . Entries and led up to the first modern computer, starting include the following: in 2400 BCE with the invention of the abacus in Babylonia and ending with the 1949 Popular Me- • Related fields of study to illustrate the connec- chanics prediction that computers of the future tions between the various branches of computer might weigh no more than 1 .5 tons; science including computer engineering, soft- • A time of the development of microprocessors ware engineering, biotechnology, security, robot- from the Intel 4004 in 1971 to the IBM POWER8 ics, gaming, and programming languages; in 2014; • A brief, concrete summary of the topic and how • Nobel Notes that explain the significance of the the entry is organized; prizes in physics to the study of the science and • Principal terms that are fundamental to the dis- • List of important figures in computer science and cussion and to understanding the concepts their key accomplishment; presented; • Glossary; • Illustrations that clarify difficult concepts via mod- • General bibliography; and els, diagrams, and charts of such key topics as • Subject index . wide area networks (WAN), electronic circuits, and quantum computing; Salem Press and Grey House Publishing extend their • Photographs of significant contributors to the appreciation to all involved in the development field of computer science; and production of this work . The entries have been • Sample problems that further demonstrate the written by experts in the field . Their names and affili- concept presented; ations follow the Editor’s Introduction . • Further reading lists that relate to the entry . Principles of Computer Science, as well as all Salem Press This reference work begins with a comprehen- reference books, is available in print and as an e- sive introduction to the field, written by editor book . Please visit www .salempress .com for more Donald R . Franceschetti, PhD, starting with the information . vii Principles of computer science_FM.indd 7 10/19/16 7:42 PM Principles of computer science_FM.indd 8 10/19/16 7:42 PM editor's Introduction What is Computer science? The earliest innovations in telegraphy greatly in- Computer science generally refers to the body of creased the number of messages that could be sent si- knowledge that allows humans to use mechanical multaneously . It was eventually learned that by using aids to do mathematical calculations very efficiently . more than two conductors, several symbols could be While the term computer originally referred to a sent at the same time . Of course, it should be noted human who was able to do simple arithmetic quickly that the original Morse code used to tap out messages and accurately, the name has been transferred to pro- with a series of dots and dashes was highly inefficient grammable automata, which are able to do the same and error prone . Suppose seven wires carried voltage thousands to billions of times faster . simultaneously . With seven voltages, one can encode 27 =128 symbol choices, a calculation that accounts Analogue or Digital for the digits of the decimal system plus upper and There are two basic kinds of computers: analogue lower case letters plus several punctuation marks . and digital . In an analog process, the system of in- The telegraph thus becomes a teletype machine ca- terest is modeled by a system obeying the same dy- pable of transmitting information a hundred times namical laws . Thus a system of mechanical vibrations faster . might be modeled by a system of capacitors, induc- Once the process of telegraphy was in place, it was tors, and resistors . In a digital computer, the quantity a simple matter to switch from the network of tele- of interest is generally encoded in some way and one graph stations to radio . Once amplitude modulation obtains coded representation of the solution . Some was discovered voice could be transmitted over the of the advances are fairly mundane and are actually air or over wires with ease . Television eventually fol- possible to achieve with low-tech adding machines, lowed . Many of the pioneers of electronic technology if one has enough time . Others are a bit more eso- were self-educated men—men like Thomas Edison, teric, requiring some abstract mathematics . Almost and Michael Faraday before him—who could read all computing machines, with the notable exceptions well enough but functioned outside the establish- of the abacus and slide rule, have come into existence ment of colleges and academic degrees . Even today since the beginning of the twentieth century and rest there is some controversy over the value of traditional on the fundamental discoveries made about electro- education as many pioneers of the computer sciences magnetism since 1800, as well as more recent insights dropped their pursuit of traditional degrees, such as gained into the process of computation . Bill Gates and Steve Jobs, while means that the ques- tion still remains open . Digital Computation Requires a Code Still, formal education came to be an important Digital computation begins with the selection of aspect of the inexorable march toward the computer a code so that information can be stored and sent age . In the United Kingdom, while social standing may over significant distances . It can be difficult for those have prevent many from attending a university enroll- living in the twenty-first century to appreciate the full ment, entire institutions were set up to teach those impact of the development of telegraphy, by which who had not the pedigree to be accepted at Oxford information (letters and numbers) could be trans- or Cambridge, notably the Royal Institution, a school mitted from one place to another as a series of dots operating under Royal charter and featuring both and dashes, using a pair of telegraph wires strung be- Sir Humphrey Davy and Michael Faraday (who both tween two cities along with the necessary relay equip- declined to be knighted) as lecturers . Things were ment . For the first time, the results of a baseball game somewhat more democratic in the United States, with or a battle or the day’s stock trading could be known public universities in almost every state that were sup- almost instantly . It’s not surprising that so many in- ported by agriculture and expected to make a contri- novators in the area of information exchange began bution in return . Private institutions set up chapters their careers as telegraph operators . of Phi Beta Kappa to encourage traditional study of ix Principles of computer science_FM.indd 9 10/19/16 7:42 PM