代写代考 COMP 30080 Computer Systems

COMP 30080 Computer Systems
1. Introduction
UCD School of Computer Science. Scoil na Ríomheolaíochta UCD.

Copyright By PowCoder代写 加微信 powcoder

Introduction
1. Early Computers
3. Assembly Language
4. High Level Languages
5. Compilers and Assemblers
: UCD : COMP30080 : Computer Systems : 1 : Introduction 2

Z3 by (Germany, completed in 1941)
: UCD : COMP30080 : Computer Systems : 1 : Introduction 3

THE ENIAC: Electronic Numerical Integrator And Computer http://youtu.be/goi6NAHMKog
: UCD : COMP30080 : Computer Systems : 1 : Introduction 4

• Constructed 1943-1946
• Funded by U.S. Army to calculate ballistic tables.
• Designed at the Moore School, University of Pennsylvania.
• Designed by J. , Jr., and . Mauchly.
• first electronic large-scale, general- purpose digital computer.
• Decimal, not binary.
• Value tubes, not transistors.
: UCD : COMP30080 : Computer Systems : 1 : Introduction 5

KATHLEEN McNULTY
• One of the six original ENIAC programmers.
• Born 1921 in Cresslough, Co. Donegal.
• Emigrated to Philedelphia in 1924.
• Maths graduate.
• Hired by the US Army Ballistic Research Lab as a human computer, went on to be part of the original team that programmed ENIAC.
: UCD : COMP30080 : Computer Systems : 1 : Introduction 6

• World famous mathematician.
• Worked on the Manhattan project. • Consultant to the ENIAC project.
• Publications on computers, 1945-51 ‣ First Draft of a Report on the EDVAC ‣ Proposed binary, shared memory,
i.e. same memory for program and data
• EDVAC was the planned successor to the ENIAC.
• Eckert and Mauchly were not named in the papers.
: UCD : COMP30080 : Computer Systems : 1 : Introduction 7

• architecture:
Central Processing Unit
Control ALU Unit
Input / Output System
Input Output
Main memory
: UCD : COMP30080 : Computer Systems : 1 : Introduction 8

• Main memory
‣ Stores data and instructions encoded as voltage levels (1’s and 0’s)
‣ Transfers data to/from other devices (e.g. keyboard, screen)
• Central Processing Unit (CPU) consists of:
‣ Control unit
• Loads instructions from memory
• Decodes the instructions and provides control signals to the rest of the CPU
• Controls sequencing of instructions via Program Counter
‣ Registers
• Store data
• Update of registers controlled by Control Unit
‣ Arithmetic and Logic Unit (ALU)
• Performs operations, usually 2 inputs and 1 output per operation • Controlled by signals from Control Unit
: UCD : COMP30080 : Computer Systems : 1 : Introduction 9

• Cycle (driven by CPU Control Unit):
–Next instruction from memory
– Instruction into ALU control settings
–If necessary, load input data from memory to registers
– Perform instruction by operating on data contained in registers –If necessary, store output data from registers to memory
: UCD : COMP30080 : Computer Systems : 1 : Introduction 10

• The instructions fetched from memory, decoded and executed are binary words in machine instruction format.
• To help humans, each binary machine instruction has a symbolic equivalent in assembly instruction.
Assembly Language
Machine Language
10001100100010000000000000000000 10001100101010010000000000000000 10101100101010000000000000000000 10101100100010010000000000000000
$t1, 0($a0) $t2, 0($a1) $t1, 0($a1) $t2, 0($a0)
: UCD : COMP30080 : Computer Systems : 1 : Introduction 11

• “A computer’s Instruction Set Architecture (ISA) is a specification of all possible instructions that the processor can perform, its data types, registers, addressing modes, memory arrangement, interrupt and exception handling, and external Input-Output sub-systems.”
• The ISA is a complete description of the processor from the programmer’s point of view.
• A computer’s ISA can be thought of as the Hardware-Software Interface.
: UCD : COMP30080 : Computer Systems : 1 : Introduction 12

Low Level Languages
• “Machine language is a computer programming language consisting of binary or hexadecimal instructions which the computer hardware can execute directly.”
• “Assembly language is computer programming language consisting of human readable symbolic instructions that can be directly converted to machine instructions”.
• Machine & assembly language instructions are very limited.
• Therefore, programming in assembly is time consuming.
• Additionally, assembly code is specific to an particular architecture. Hence, assembly code written for the PC will not work on the Mac.
: UCD : COMP30080 : Computer Systems : 1 : Introduction 13

High Level Languages
• “A high level programming language is composed of words and algebraic notation that can be translated by a compiler into assembly language”. e.g. Java, C, C++.
•These languages are:
Much closer to natural language than low level languages and so are easier to read and understand.
Provide the programmer with much more powerful instructions and a given program requires less lines of code.
Are machine independent allowing for portability.
Computer hardware can ONLY decode and execute machine code written according to its own ISA.
Programmers rely on compilers to convert programs written in high-level languages to machine code targeting a specific ISA. Therefore, a program compiled for an Intel-based PC will not work on an ARM-based mobile phone, and vice versa.
: UCD : COMP30080 : Computer Systems : 1 : Introduction 14

Compilers and Assemblers
void swap(int *x, int *y)
int temp1, temp2;
temp1 = *x;
temp2 = *y;
*y = temp1;
*x = temp2;
lw $t1, 0($a0) lw $t2, 0($a1) sw $t1, 0($a1) sw $t2, 0($a0) …
10001100100010000000000000000000
10001100101010010000000000000000
10101100101010000000000000000000
10101100100010010000000000000000
High level language
Assembly language
Machine language
: UCD : COMP30080 : Computer Systems : 1 : Introduction 15

Compilers and Assemblers
• “A compiler is a program that translates a program written using a high-level language into assembly language.”
• “An assembler is a program that translates a program written using assembly language into the binary version in machine language.”
• Most IDEs (Integrated Development Environments) include a compiler and an assembler plus an editor, a debugger and help documentation, e.g. Eclipse or Microsoft Visual Studio.
: UCD : COMP30080 : Computer Systems : 1 : Introduction 16

Note, Java Virtual Machine (JVM) Compilation & Execution is a different, but we will discuss that later…..
Java program
Class files (Java bytecode)
Just In Time Java Virtual Compiler Machine
: UCD : COMP30080 : Computer Systems : 1 : Introduction 17
Java library routines (machine language)
Compiled Java methods (machine language)

References
• Reading:
–Patterson & Hennessy, Computer Organization and Design • Chapter 1
: UCD : COMP30080 : Computer Systems : 1 : Introduction 18

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com