lecture 3
play

Lecture 3 Hardware and Software 3. Hardware and Softw are 4. - PDF document

1. Introduction 2. Binary Representation Lecture 3 Hardware and Software 3. Hardware and Softw are 4. High Level Languages 5. Standard input and output Hardware has been defined as 6. Operators, expression and statem ents the


  1. 1. Introduction 2. Binary Representation Lecture 3 Hardware and Software 3. Hardware and Softw are 4. High Level Languages 5. Standard input and output • Hardware has been defined as 6. Operators, expression and statem ents ‘the part of the computer you can kick’! 7. M aking Decisions 8. Looping • The rest is software - the pattern of 0s 9. Arrays and 1s that comprise a program. 10. Basics of pointers • To a large extent hardware and 11. Strings 12. Basics of functions software are interchangeable. 13. M ore about functions – A logical function could be implemented in 14. Files either as a chip or a program 14. Data Struc tures 16. Cas e study: lottery num ber generator Von Neumann Architecture Von Neumann Architecture • The earliest computers • In 1946, Mathematician John Von (1940’s) used “hard wired” Neumann proposed that programs programs where the 0’s and 1’s were set by means of could be stored in memory, the same switches or plugboards way as data. – Both can be represented by binary codes • This “Stored program” concept is the basis of all modern computers. Von Neumann Architecture Von Neumann Architecture Secondary Interface • Memory - this stores the 0s and 1s Storage – There are basically two sorts S • RAM - Random Access Memory U CPU Memory B A T A – general purpose memory D – can be used for storing instructions and data – Can be written to or read from I/O – Looses state when power is turned off Peripheral Devices • ROM - Read Only Memory printers – used to contain permanent data or instructions terminals etc – Replaces hardwiring – Retains state when power is off • The same basic architecture applied from micro- – In a PC it contains POST (power on self test) and BIOS (basic input/output systems) programs. These are often called “firmware” and controllers to mainframes, although details do differ are not strictly speaking ROM • PROMs,EPROMs 1

  2. Von Neumann Architecture Von Neumann Architecture • Secondary Storage • CPU - Central Processing Unit – provides a further area for storing information – The power behind the computer, contains – Can take many physical forms but most commonly magnetic disk storage • data registers (internal memory) for holding data – Can also have read only secondary storage eg CD-ROM – Typically • address registers for holding memory • slower than main memory addresses • larger storage than main memory • ALU - Arithmetic Logic Unit • lower price per MB of memory • Shift registers • Cache memory Von Neumann Architecture Von Neumann Architecture • Buses • I/O - Input/Output – a bus is simply a set of wires which act as – forms the interface between the computer a data highway for moving binary and external peripheral devices information around the computer • Peripheral Devices • address bus – Typically keyboard, display, printer, • data bus scanner, network adapter etc • control bus – 1 wire transmits one bit Memory Map Memory Map - Addresses • Memory is organised into bytes (or words), each of “high memory” 8 bits which must have its own unique address, so it can be identified FF FF FF • Suppose we have a 24-bit address bus, then there are General Purpose Memory 8M RAM 2 24 =16,777,216 addresses which constitute our address space 80 00 00 7F FF FF • The lowest is 000000 hex and the highest FFFFFF hex Could be filled later NOT USED 02 00 00 Memory Mapped I/O 01 FF FF 64K I/O 00 FF FF 64K ROM Boot loader etc. “low memory” 00 00 00 2

  3. Memory Access - read/Write Memory access cycles • To read data from memory into the CPU • Write access is similar but the write line is activated instead of the read line and hence the data is – The CPU puts the relevant address onto the address bus transferred from the CPU to the memory cell – The appropriate memory cell recognises its own address (actually performed by a circuit called an address decoder) • It is important to be clear about the difference – The CPU waits for this to happen then activates the read line between addresses and data. Both are binary codes – The memory cell connects its output to the databus – The CPU waits for this to happen then copies the data from the bus Dr R Bowden to an internal register address 9A BC 2D – The CPU deactivates the read line, the memory cell is disconnected from the databus • The address identifies a particular memory location – The CPU removes the address from the address bus • The data is the contents of that location • NB all operations take a non-zero amount of time which NB Here data includes instructions must be allowed for e.g. a memory read may take 100ns 3

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend