Scott Marino MSMIS Kean University MSAS5104 Introduction to Programming with Data Structures and Algorithms Week 2 Scott Marino
MSMIS Kean University Topics Course requirements and introductions What is a computer? Hardware and Software Numbering systems and data Bits, bytes, and words
Scott Marino MSMIS Kean University Course Requirements Catalog description –Objective –Pre-requisites –Course Outline –Homework –Description –Texts –Attendance Contact Information or Student contact card –Name – –Phone number –Major –Goal for course –Programming experience
Scott Marino MSMIS Kean University What is a computer? Definition: A computer is a machine that, given instructions, can manipulate data by itself The first computers were introduced in the 1940’s – Atanasoff-Berry machine – Z3 program controlled calculator – ENIAC 19,000 Vacuum tubes Weighed 30 tons Filled an entire room
Scott Marino MSMIS Kean University What is a computer? Generations –First generation Used vacuum tubes 1940’s to late 1950’s –Second Generation Used transistors Late 1950’s to mid 1960’s –Third Generation Used integrated circuits Mid 1960’s to early 1970’s –Fourth Generation Uses high density integrated circuits Mid 1970’s to today –Fifth Generation ???
Scott Marino MSMIS Kean University What is a computer? A computer is a system consisting of hardware and software that are interconnected and must work together Hardware consists of the actual pieces of equipment –Circuit boards, monitors, keyboards, mice, sound cards, modems, cables, printers, etc.
Scott Marino MSMIS Kean University What is a computer? Software consists of the instructions to the hardware that direct it to perform tasks –Display an image, print a character, make a sound, move the cursor when the mouse moves, save a file, send an , load a web page etc.
Scott Marino MSMIS Kean University Computer Hardware CPU - Central Processing Unit –3 main functions Control - takes each instruction in a program, evaluates it, and directs some part of the computer to perform an action Arithmetic Operations - performs math calculations like addition, subtraction, division, and multiplication Logical Operations - performs comparison operations like equal to, greater than, less than, etc.
Scott Marino MSMIS Kean University Computer Hardware Main Memory –A temporary working area used to hold instructions and data –Consists of thousands, millions, or billions of locations –Each location is at an address, a unique identifier used by the CPU to refer to the location –Random access to each location is able to be performed because addressing –Main memory is volatile, it disappears when the power is turned off –Fast access
Scott Marino MSMIS Kean University Computer Hardware Secondary Storage –A more permanent storage area for data and instructions –Includes hard disks, floppy disks, magnetic tape, CD- ROM, etc –Typically stored in blocks or chunks of data –Allows for more storage area than main memory, but is slower to access Rotational delay and seek time
Scott Marino MSMIS Kean University Computer Hardware Input and Output Components –Input devices provide instructions or data to the CPU Input typically comes from a keyboard, mouse, optical scanner etc. –Output devices provide a place for the computer to produce a tangible result Output is typically routed to a monitor or a printer
Scott Marino MSMIS Kean University Computer Software Software is the instructions that make the hardware perform actions Application software –Written to perform tasks for individual users Games, word processors, spread sheets, internet browsers, e- mail, etc –Most common type of software written
Scott Marino MSMIS Kean University Computer Software System software –Controls the hardware and operates the computer –Directs physical input and output allowing for the transfer of signals between the CPU and other devices An O/S (operating system) is the set of system software that operates the computer –MS-DOS, Macintosh, Windows, Unix, MVS –O/S’s are usually specific to the hardware architecture
Scott Marino MSMIS Kean University Numbering Systems and Data Humans use the decimal numbering system –Developed because we had 10 fingers –Consists of 10 digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 Computers operate on a binary system at their lowest level –The tube, transistor, and integrated circuit can be in two possible states, on or off –A binary numbering system consists of zeros and ones, referred to as bits (binary digits) A decimal value of 9 is expressed as 1001
Scott Marino MSMIS Kean University Numbering Systems and Data The hexadecimal numbering system is based upon a number set with 16 values –Consists of 16 digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F The hexadecimal system is prevalent in most computer systems today Hexadecimal numbering works well with computers as 4 bits can contain 16 possible combinations
Scott Marino MSMIS Kean University Numbering Systems and Data A typical byte consists of 8 bits The ASCII character set is commonly used in PC’s, micro, mini, and midrange computer systems –American Standard Code for Information Interchange The EBCDIC is used primarily on IBM mainframes –Extended Binary Coded Decimal Interchange Code
Scott Marino MSMIS Kean University Numbering Systems and Data ASCII Codes –Utilizes 7 bits of storage (the leftmost position/bit remains unused) –Allows for 128 possible characters 2 raised to the 7th power –Not enough combinations for international character sets which causes some problems –Keep in mind that in ASCII, the numeric value displayed is a display value, not necessarily the number itself
Scott Marino MSMIS Kean University Numbering Systems and Data EBCDIC Codes –Utilizes all 8 bits in the byte –Allows for 256 possible characters 2 raised to the 8th power –Like ASCII, there are not enough characters to satisfy all the international character sets Translation programs exist that allow for the conversion between EBCDIC and ASCII
Scott Marino MSMIS Kean University Numbering Systems and Data ASCII and EBCDIC characters are typically stored as 8 binary digits known as a byte The assignment of characters to their binary representations is in a particular sequence –Notably - Numbers, uppercase letters then lowercase letters When sorting or comparing values, the computer is operating on the binary values The letter “A” is mathematically lower than the letter “a”
Scott Marino MSMIS Kean University Bits, Bytes, and Words Defined Bit - binary digit expressed as a zero or a one Byte - most commonly a collection of 8 bits –The smallest unit that any computer operates upon Word - a collection of bytes –Different sizes for different machines –Usually the number of bits that a computer can process simultaneously –16, 32, 64, 128 etc. are common word sizes Windows 3.1 was a 16 bit O/S, Windows 2000 is a 32 bit O/S