Computer Architecture - Sections 2.1-2.5
Computer Architecture - Sections 2.1-2.5 CS 3340
Popular in Computer Architecture
verified elite notetaker
Popular in Computer Science and Engineering
This 5 page Class Notes was uploaded by Aaron Maynard on Thursday September 1, 2016. The Class Notes belongs to CS 3340 at University of Texas at Dallas taught by in Fall 2016. Since its upload, it has received 26 views. For similar materials see Computer Architecture in Computer Science and Engineering at University of Texas at Dallas.
Reviews for Computer Architecture - Sections 2.1-2.5
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 09/01/16
COMPUTER ARCHITECTURE FALL SEMESTER 2016 INSTRUCTOR: DR. KAREN MAZIDI firstname.lastname@example.org 1 September 2016 - Chapter 2 These sets of notes will be covering the subjects covered in CS 3340.003 (and other). This packet will cover topics within Chapter 2 of Computer Organization and Design, Fifth Edition: The Hardware/Software Interface by Patterson and Hennessay. Any material on these pages include but are not limited to presentational slides provided by the prof or. Each s ay contain concluding remarks at the end of each set. Computer Instructions In computer science, an instruction is a single operation of a processor defined by the processor instruction set. The size or length of an instruction varies widely, from as little as 4-bits in some microcontrollers to many as multiples of a bytes in some very long instruction word (VLIW) systems. In particular we are talking about the machine or assembly language instructions of the CPU. This is where our high-level code is compiled into machine / assembly code. 1 Instruction Set The instruction set is the complete set of all the instructions in machine code that can be recognized and executed by a central processing unit. Different types of computers will have different instruction sets, however many aspects of the sets will remain common. Early computers have simple instruction sets with a simplified implementation; many of today’s modern computers still utilize these simple instruction sets. MIPS Instruction Set MIPS (originally an acronym for Microprocessor without Interlocked Pipeline Stages) is a reduced instruction set computer (RISC) instruction set architecture (ISA). This instruction set comprises much of the applications in today's consumer electronics, networks, storage equipment, cameras and even printers. Other instructions sets include the ARMv7, ARMv8 and the Intel x86. ARM, originally Acorn RISC Machine, later Advanced RISC Machine, is a family of reduced instruction set computing (RISC) architectures for computer processors, configured for various environments. The x86 instruction set refers to the set of instructions that x86-compatible microprocessors support. The instructions are usually part of an executable program, often stored as a computer file and executed on the processor. Registers In a computer, a register is one of a small set of data holding places that are part of a computer processor. A register may hold a computer instruction , a storage address, or any kind of data (such as a bit sequence or individual characters). Some instructions specify registers as part of 2 the instruction. The advantage of using registers is that the program can easily and quickly access the storage. Register Operands Register operands refer to data stored in registers. The following examples show typical register operands. An offset stored in a base or index register often serves as a pointer into memory. You can store an offset in one of the base or index registers, then use the register as an indirect memory operand. More registers might increase the clock cycle time because it takes electronic signals longer to travel farther The number of registers influences the instruction size: you can address 32 registers in 5 bits (25 = 32). Register Operand Code Example C code: f = (g + h) - (i + j); f, …, j in $s0, …, $s4 Compiled MIPS code: add $t0, $s1, $s2 add $t1, $s3, $s4 sub $s0, $t0, $t1 Memory Operands Main memory (RAM) used for composite data, ie: Arrays, structures, dynamic data. In order to apply arithmetic operations, we must: 1. Load values from memory into registers 2. Store result from register to memory 3 “Memory” is the byte addressed which identifies an 8-bit byte. Data Transfer Data transfer is the process of using computing techniques and technologies to transmit or transfer electronic or analog data from one computer node to another. The speed with which data can be transmitted from one device to another. Data rates are often measured in megabits (million bits) or megabytes (million bytes) per second. These are usually abbreviated as Mbps and MBps,respectively. Another term for data transfer rate is throughput. Registers vs. Memory Registers are much faster to access than memory. Operating on memory data requires that the program used load and store functions, this means that more instructions are to be executed, thus making the program longer. The compiler must use registers for variables as much as possible. A rule of thumb is to only spill data into memory for less frequently used variables. Binary Number System The binary numeral system is a way to write numbers using only two digits: 0 and 1. These are used in computers as a series of "off" and "on" switches. In binary, each digit's place value is twice as much as that of the next digit to the right (since each digit holds two values). 4 Assembly language programmers tend to write in hexadecimal rather than binary. Two’s Complement The result is a signed binary number representing the decimal value −5 in two's-complement form. The most significant bit is 1, so the value represented is negative. The two's complement of a negative number is the corresponding positive value. The two's-complement system has the advantage that the fundamental arithmetic operations of addition, subtraction, and multiplication are identical to those for unsigned binary numbers (as long as the inputs are represented in the same number of bits and any overflow beyond those bits is discarded from the result). This property makes the system both simpler to implement and capable of easily handling higher precision arithmetic. Stored Program Computers In a stored program computer, instructions are represented in binary, just like in data. These instructions and data are stored in memory. Programs can operate on other programs, such as compilers and linkers. Binary compatibility allowed compiled programs to work on different computers, standardizing ISA’s 5
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'