CS 125 Lecture 2 Martin van Bommel. Hardware vs Software Hardware - physical components you can see and touch –e.g. processor, keyboard, disk drive Software.

Slides:



Advertisements
Similar presentations
4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 1 Engineering Problem Solving with C++, Etter/Ingber Chapter 1.
Advertisements

 2002 Prentice Hall Hardware Basics: Inside The Box Chapter 2.
 Computer hardware components are the physical pieces of the computer.  The major hardware components of a computer are: – The central processing.
ENGR2216 FORTRAN PROGRAMMING FOR ENGINEERS. Chapter 1 The computer CPU MEMORY INPUT/OUTPUT DEVICES DATA REPRESENTATION BINARY SYSTEM OCTAL & HEXADECIMAL.
Computer Hardware Introduction. Computer System Components Input Keyboard, Mouse, Camera, Touch Pad Processing CPU Output Monitor, Printer Storage Floppy,
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Main Memory Lecture 2 CSCI 1405, CSCI 1301 Introduction to Computer Science Fall 2009.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie COMP 14 Introduction to Programming Adrian Ilie June 24, 2005.
Computing Components 01/26/11. Announcements & Reminders Programs 1 due Friday, 9/2/11 What is my late policy? Proxy Codes for Labs  You should be able.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
Introduction to Computers
COMP 14 Introduction to Programming
Ceng 230 Programming with C
Introduction to Computers and Programming. Some definitions Algorithm: Algorithm: A procedure for solving a problem A procedure for solving a problem.
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
Computer System Alanoud Al Saleh. Computer systems Are defined as: A machine for solving problems. Specifically the modern computer is high-speed electronic.
Chapter 1: An Introduction to Computers and Programming Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved.
Introduction to Programming Dr Masitah Ghazali Programming Techniques I SCJ1013.
Aug CMSC 104, LECT-021 Machine Architecture and Number Systems Some material in this presentation is borrowed form Adrian Ilie From The UNIVERSITY.
Computer Hardware and Software Jinchang Wang. Hardware vs. Software Hardware is something tangible. Computer hardware includes electronic circuitry and.
1 CSC 1401 S1 Computer Programming I Hamid Harroud School of Science and Engineering, Akhawayn University
CSCI 125 & 161 Lecture 2 Martin van Bommel. Hardware vs Software Hardware - physical components you can see and touch –e.g. processor, keyboard, disk.
Lecture 1 Introduction to computers & VB.Net. What is a Computer? Examples? A device capable of  Performing computation  Making logical decisions 
1 Machine Architecture and Number Systems Topics Major Computer Components Bits, Bytes, and Words The Decimal Number System The Binary Number System Converting.
What is a Computer ? Computers are Electronic Machines that process (performs calculation and manipulation) Data under the control of Set of Instructions.
Chapter Two Hardware Basics: Inside the Box. ©1999 Addison Wesley Longman2.2 Chapter Outline What Computers Do A Bit About Bits The Computer’s Core: CPU.
Introduction to Computers
An Introduction to Computers August 12, 2008 Mrs. C. Furman.
Introduction to Computers
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
Copyright © 2003 by Prentice Hall Module 5 Central Processing Unit 1. Binary representation of data 2. The components of the CPU 3. CPU and Instruction.
1 Introduction to Computers Lect 1 Won’t tell you much you don’t know. (Misleading– the course gets more conceptual as we create webpages.) Will go into.
Introduction to the Computer System. What is a computer ? A computer is an electronic device that can accept data and instruction, process them or store.
Intro to Computers Computer Apps 1.
CPS120: Introduction to Computer Science Introduction to Computers.
What is a computer? A computer is a device that:
Introduction to Computer Systems and the Java Programming Language.
CPU Internal memory I/O interface circuit System bus
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.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
IT Groundwork ICS3UC - Unit 1 Hardware. Overview of Computer System.
Chapter 19 Number Systems. Irvine, Kip R. Assembly Language for Intel-Based Computers, Translating Languages English: Display the sum of A times.
School of Computer Science & Information Technology G6DICP Introduction to Computer Programming Milena Radenkovic.
CSCI-100 Introduction to Computing Hardware Part I.
Data Representation Bits, Bytes, Binary, Hexadecimal.
Computer Organization. The digital computer is a digital system that performs various computational tasks Digital computer use binary number system which.
The Computer System CS 103: Computers and Application Software.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
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,
Chapter Two Hardware Basics: Inside the Box ©1999 Addison Wesley Longman2.2 Chapter Outline What Computers Do A Bit About Bits The Computer’s Core: CPU.
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
CS 125 Lecture 3 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
CHAPTER 1 COMPUTER SCIENCE II. HISTORY OF COMPUTERS (1.1) Eniac- one of the worlds first computers Used more electricity than an entire city block of.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages.
Introduction to Programming. Key terms  CPU  I/O Devices  Main memory  Secondary memory  Operating system  User interface  Application  GUI 
Computer Architecture and Number Systems
Chapter 1: An Overview of Computers and Programming Languages
Engineering Problem Solving With C An Object Based Approach
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Microprocessor Systems Design I
Introduction to Programming
Introduction to Computer Architecture
Chapter 1: An Overview of Computers and Programming Languages
Computer Hardware Introduction.
Introduction to Computers
Computer Electronic device Accepts data - input
Computer Electronic device Accepts data - input
Introduction to Computers
Computer Electronic device Accepts data - input
Presentation transcript:

CS 125 Lecture 2 Martin van Bommel

Hardware vs Software Hardware - physical components you can see and touch –e.g. processor, keyboard, disk drive Software - instructions for hardware –e.g. operating system, compiler, word processor

Software Development Early computers - complex coding schemes –machine language - 0’s and 1’s Later on - introduction of system software –assembly language - mnemonics for operations –assembly program  assembler  machine lang Even later - compilers created –high-level languages (HLL) - natural language –HLL program  compiler  machine language

High Level Languages Ada Agusta - analytical engine John Backus - FORTRAN 1958, 60, 64 - ALGOL, COBOL, BASIC US Dept. of Defence - Ada Nicklaus Wirth - Pascal Dennis Ritchie - C Nicklaus Wirth - Modula ANSI C adopted

Computer Components CPU - Central Processing Unit –controls operation of entire systems –performs arithmetic and logic operations –stores and retrieves instructions and data contains ALU - Arithmetic-Logic Unit Control Unit

Components (con’t) Main memory (internal or primary memory) –RAM - Random Access Memory –stores instructions and data temporarily Secondary memory (external or auxiliary) –magnetic disk (hard disk or floppy) –magnetic tape Peripherals - used for Input/Output –keyboard, printer, monitor, etc.

Internal Representation Each unit of memory a two-state device –off or on, 0 or 1 –represent in Binary, two Binary Digits (bits) Organized into groups of 8 bits - bytes –represents single keyboard character Larger grouping of 16 or 32 bits - word –represents single integer value –identified by address for access

Memory Sizes Kilobyte (K) = 2^10 = 1,024 bytes Megabyte (Mb) = 2^20 = 1,048,576 bytes Gigabyte (Gb) = 2^30 = 1,073,741,824 bytes

Decimal Number Systems Base 10 Digits - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 e.g = = 3 x 10^2 + 4 x 10^1 + 2 x10^0 = 3 x x x 1 =

Binary Number System Base 2 Digits 0, 1 e.g = = 1 x 2^2 + 1 x 2^1 + 0 x 2^0 = 1 x x x 1 = = 6

16-bit Memory Word To store number 6, use Value 0 is Largest value is = 65,535 = 2^ bit word gives largest value > 4 billion

Converting Decimal to Binary Repeatedly divide by 2, recording remainders in reverse order e.g. 53 / 2 = 26 R 1 26 / 2 = 13 R 0 13 / 2 = 6 R 1 6 / 2 = 3 R 0 3 / 2 = 1 R 1 1 / 2 = 0 R 1 giving

Converting Binary to Decimal Repeatedly multiply by 2 and add next bit e.g x 2 = = 1 1 x 2 = = 3 3 x 2 = = 6 6 x 2 = = x 2 = = x 2 = = 53

Storing Negative Values Sign Magnitude –use first bit as sign bit, 0 = positive 1 = negative –e.g. 8-bits = = = = -1… = = -127 –problem -0 ????

Negatives (2) One’s complement - complement bits if neg –e.g = = –e.g. 8-bits = = = = -1… = = -127

Negatives (3) Two’s complement –if positive, use binary –if negative, complement bits and add one –e.g magnitude complement add

8-bit Two’s Compement = = = = = -2… = = = -128

16-bit two’s complement 8-bit two’s complement range is - 2^7 to 2^ to bit two’s complement range is - 2^15 to 2^ ,768 to 32,767