CSCE 106 Fundamentals of Computer Science Assisting Slides The American University in Cairo Computer Science and Engineering Department.

Slides:



Advertisements
Similar presentations
Chapter 2: Data Manipulation
Advertisements

Chapter 2 Data Manipulation Dr. Farzana Rahman Assistant Professor Department of Computer Science James Madison University 1 Some sldes are adapted from.
Introduction Extended and Concise Prelude to Programming Concepts and Design Copyright © 2003 Scott/Jones, Inc.. All rights reserved. 1 Introduction.
Chapter 1: Data Storage.
Chapter 1 Data Storage. 2 Chapter 1: Data Storage 1.1 Bits and Their Storage 1.2 Main Memory 1.3 Mass Storage 1.4 Representing Information as Bit Patterns.
Chapter 0: Introduction
Bits and Data Storage. Basic Hardware Units of a Computer.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 0: Introduction Computer Science: An Overview Eleventh Edition
HARDWARE: CPU & STORAGE How to Buy a Multimedia Computer System.
INTRODUCTION TO COMPUTING Course Instructor: Asma Sanam Larik.
An Abacus. Babbage’s Analytical Engine  Punched cards  First used in Jacquard Loom (1801) to store patterns for weaving cloth  Stored programs in Babbage’s.
Computer Terminology Chapter 2 CIT History of Computers First known device used to compute was the Abacus 3000 BC 1617 John Napier created a crude.
Pengantar Teknologi Informasi dan Ilmu Komputer Information Technology and Data Representation PTIIK- UB.
Hardware Data Storage.
Machine Architecture CMSC 104, Section 4 Richard Chang 1.
CMSC 120: Visualizing Information 1/29/08 Introduction to Computing.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
© 2007 Pearson Addison-Wesley. All rights reserved 0-1 Spring(2007) Instructor: Qiong Cheng © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 1: Data Storage.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Computer Science: An Overview Tenth Edition by J. Glenn Brookshear Chapter.
Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers.
Chapter 0 Introduction © 2007 Pearson Addison-Wesley. All rights reserved.
Introduction to Computer Science by Kai-Lung Hua Chapter 0: Introduction.
Chapter 1 Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers.
Chapter 1 Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Copyright © 2015 Pearson Education, Inc. Chapter 1: Data Storage.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
CSCI-100 Introduction to Computing Hardware Part I.
Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Computer Science: An Overview Tenth Edition by J. Glenn Brookshear Chapter.
Computer Systems. Bits Computers represent information as patterns of bits A bit (binary digit) is either 0 or 1 –binary  “two states” true and false,
Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 1 Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Copyright © 2015 Pearson Education, Inc. Chapter 0: Introduction.
Chapter 0 Introduction. © 2005 Pearson Addison-Wesley. All rights reserved 0-2 Chapter 0: Introduction 0.1 The Role of Algorithms 0.2 The Origins of Computing.
Memory The term memory is referred to computer’s main memory, or RAM (Random Access Memory). RAM is the location where data and programs are stored (temporarily),
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Data Storage Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear.
Computer Systems Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
© 2015 Pearson Education Limited 2015 Quiz in last 15 minutes Midterm 1 is next Sunday Assignment 1 due today at 4pm Assignment 2 will be up today; due.
Chapter 1: Data Storage.
Computer Science: An Overview Eleventh Edition
An Overview of the Computer System
Chapter 0: Introduction
Chapter 1: An Overview of Computers and Programming Languages
Storage Hardware This icon indicates the slide contains activities created in Flash. These activities are not editable. For more detailed instructions,
Introduction to Computer Architecture
Looking Inside the machine (Types of hardware, CPU, Memory)
An Overview of the Computer System
Chapter 1 Data Storage.
Chapter 0 Introduction © 2007 Pearson Addison-Wesley.
Main memory and mass storage
Chapter 0: Introduction
Chapter 2: Computer Hardware
Chapter 0: Introduction
Chapter 0: Introduction
Presentation transcript:

CSCE 106 Fundamentals of Computer Science Assisting Slides The American University in Cairo Computer Science and Engineering Department

0-2 Introduction to Computer Systems

0-3 Origins of Computing Machines Early computing devices – Abacus: positions of beads represent numbers – Gear-based machines (1600s-1800s) Positions of gears represent numbers Blaise Pascal, Wilhelm Leibniz, Charles Babbage

0-4 Figure 0.3 An Abacus

0-5 Early Data Storage Punched cards – First used in Jacquard Loom (1801) to store patterns for weaving cloth – Storage of programs in Babbage’s Analytical Engine – Popular through the 1970’s Gear positions

0-6 Early Computers Based on mechanical relays – 1940: Stibitz at Bell Laboratories – 1944: Mark I: Howard Aiken and IBM at Harvard Based on vacuum tubes – : Atanasoff-Berry at Iowa State – 1940s: Colossus: secret German code-breaker – 1940s: ENIAC: Mauchly & Eckert at U. of Penn.

0-7 Figure 0.4 The Mark I computer

0-8 Personal Computers – First used by hobbyists – IBM introduced the PC in Accepted by business Became the standard hardware design for most desktop computers Most PCs use software from Microsoft

0-9 Terminology Hardware: Equipment Software: Programs and algorithms

2-10 Computer Architecture Central Processing Unit (CPU) or processor – Arithmetic/Logic unit versus Control unit – Registers General purpose Special purpose Bus Motherboard

2-11 Figure 2.1 CPU and main memory connected via a bus

1-12 Memory Terminology Random Access Memory (RAM): Memory in which individual cells can be easily accessed in any order Dynamic Memory (DRAM): RAM composed of volatile memory

1-13 Main Memory Addresses Address: A “name” that uniquely identifies one cell in the computer’s main memory – The names are actually numbers. – These numbers are assigned consecutively starting at zero. – Numbering the cells in this manner associates an order with the memory cells.

1-14 Bits and Bit Patterns Bit: Binary Digit (0 or 1) Bit Patterns are used to represent information. – Numbers – Text characters – Images – Sound – And others

1-15 Main Memory Cells Cell: A unit of main memory (typically 8 bits which is one byte) – Most significant bit: the bit at the left (high-order) end of the conceptual row of bits in a memory cell – Least significant bit: the bit at the right (low-order) end of the conceptual row of bits in a memory cell

1-16 Figure 1.7 The organization of a byte-size memory cell

1-17 Figure 1.8 Memory cells arranged by address

1-18 Measuring Memory Capacity Kilobyte: 2 10 bytes = 1024 bytes – Example: 3 KB = 3 times1024 bytes – Sometimes “kibi” rather than “kilo” Megabyte: 2 20 bytes = 1,048,576 bytes – Example: 3 MB = 3 times 1,048,576 bytes – Sometimes “megi” rather than “mega” Gigabyte: 2 30 bytes = 1,073,741,824 bytes – Example: 3 GB = 3 times 1,073,741,824 bytes – Sometimes “gigi” rather than “giga”

1-19 Mass Storage On-line versus off-line Typically larger than main memory Typically less volatile than main memory Typically slower than main memory

1-20 Mass Storage Systems Magnetic Systems – Disk – Tape Optical Systems – CD – DVD Flash Drives

1-21 Figure 1.9 A magnetic disk storage system

1-22 Representing Text Each character (letter, punctuation, etc.) is assigned a unique bit pattern. – ASCII: Uses patterns of 7-bits to represent most symbols used in written English text – Unicode: Uses patterns of 16-bits to represent the major symbols used in languages world side – ISO standard: Uses patterns of 32-bits to represent most symbols used in languages world wide

1-23 Representing Numeric Values Binary notation: Uses bits to represent a number in base two Limitations of computer representations of numeric values – Overflow – occurs when a value is too big to be represented – Truncation – occurs when a value cannot be represented accurately

1-24 The Binary System The traditional decimal system is based on powers of ten. The Binary system is based on powers of two.

1-25 Figure 1.15 The base ten and binary systems

1-26 Figure 1.16 Decoding the binary representation

1-27 Figure 1.17 An algorithm for finding the binary representation of a positive integer

1-28 Figure 1.18 Applying the algorithm in Figure 1.15 to obtain the binary representation of thirteen

1-29 Figure 1.19 The binary addition facts

2-30 Figure 2.2 Adding values stored in memory

2-31 Figure 2.3 Dividing values stored in memory

1-32 Boolean Operations Boolean Operation: An operation that manipulates one or more true/false values Specific operations – AND – OR – NOT

1-33 Figure 1.1 The Boolean operations AND and OR

2-34 Stored Program Concept A program can be encoded as bit patterns and stored in main memory. From there, the CPU can then extract the instructions and execute them. In turn, the program to be executed can be altered easily.

0-35 Terminology Algorithm: A set of steps that defines how a task is performed Program: A representation of an algorithm Programming: The process of developing a program

2-36 Low Level Language First Generation Language Machine instruction: An instruction (or command) encoded as a bit pattern recognizable by the CPU Machine language: The set of all instructions recognized by a machine

2-37 Machine Instruction Types Data Transfer: copy data from one location to another Arithmetic/Logic: use existing bit patterns to compute a new bit patterns Control: direct the execution of the program

2-38 Program Execution Controlled by two special-purpose registers – Program counter: address of next instruction – Instruction register: current instruction Machine Cycle – Fetch – Decode – Execute

2-39 Figure 2.8 The machine cycle

0-40 Ethical Theories Consequence based: What leads to the greatest benefit? Duty based: What are my intrinsic obligations? Contract based: What contracts must I honor? Character based: Who do I want to be?