Two s Compliment Negative integers are represented using two s compliment representation.

Size: px
Start display at page:

Download "Two s Compliment Negative integers are represented using two s compliment representation."

Transcription

1 Chapter 1 Data representation Binary numbers Base 2 numbers in which each binary digit is either a 0 or a 1 Ie b = 65d Integer storage sizes Unsigned Integers Signed Integers BYTE (1 byte) 0 to 255 (2 8 1) SBYTE -128 to 127 WORD (2 bytes) 0 to 65,535 (2 16 1) SWORD to (2 15 1) DWORD (4 bytes) 0 to (2 32 1) SDWORD to (2 31 1) QWORD (8 bytes) 0 to (2 64 1) SQWORD to (2 63 1) Hexadecimal numbers Base 16 numbers, each digit representing four binary bits. Ie. 7Ah = b = 90d Two s Compliment Negative integers are represented using two s compliment representation. Starting value Reverse the bits Add is the two s compliment Starting value Reverse Add 1 6A3D 95C2 95C2 is the two s compliment Boolean Operators NOT The NOT operation reverses a Boolean value. AND The output is only true when both operands are true. Otherwise, it is false. OR The output is false only when both operands are false.

2 Chapter 2 Basic Microcomputer Design The central processing unit (CPU) is where all the calculations and logic operations take place. It contains a limited number of storage locations called registers, a high-frequency clock, a control unit, and an arithmetic logic unit. The clock synchronizes the internal operations of the CPU. The control unit (CU) coordinates the sequencing of steps involved in executing machine instructions. The arithmetic logic unit (ALU) performs arithmetic operations such as addition and subtraction, and logical operations such as AND, OR, and NOT. A bus is a group of parallel wires that transfer data from part of the computer to another. The system bus of a computer usually consists of three different busses. The data bus transfers instructions and data between the CPU and memory. The control bus uses binary signals to synchronize the actions of all devices attached to the system bus. The address bus holds the addresses of instructions and data when the currently executing instruction transfers data between the CPU and memory. Instruction Execution Cycle The execution of a single machine instruction can be divided into a sequence of individual operations called the instruction execution cycle. Fetch: The control unit fetches the instruction, copying it from memory into the CPU and increments the program counter (a register containing the address of the next instruction about to be executed). Decode: The control unit determines the type of instruction to be executed. It passes zero or more operands to the arithmetic logic unit and sends signals to the ALU that indicate the type of operation to be performed. Fetch operands: If a memory operand is used, the control unit initiates a read operation to retrieve the input operand from memory. Execute: The ALU executes the instruction, sends its data to the output operand, and updates status flags providing information about the output. Store output operand: If the output operand is in memory, the control unit initiates a write operation to store the data. Pipelines The processor can execute the steps in parallel, a technique known as pipelining. The IA- 32 processor is a pipelined processor with a six-stage execution cycle. 1. Bus Interface Unit (BIU): accesses memory and provides input-output. 2. Code Prefetch Unit: receives machine instructions from the BIU and inserts them into a holding area named the instruction queue.

3 3. Instruction Decode Unit: decodes machine instructions from the prefetch queue and translates them into microcode. 4. Execution Unit: executes the microcode instructions produced by the instruction decode unit. 5. Segment Unit: translates logical addresses to linear addresses and performs protection checks. 6. Paging Unit: translates linear addresses into physical addresses, performs page protection checks, and keeps a list of recently accessed pages. Stages Cycles S1 S2 S3 S4 S5 S6 Cycles Stages S1 S2 S3 S4 S5 S6 Non-pipelined execution Six-stage pipeline execution Cycles Stages exe S1 S2 S3 S4 S5 I-3 I-3 I-3 I-3 I-3 I-3 S6 I-3 Cycles Stages S4 S1 S2 S3 u v S5 S I-3 4 I-4 I-3 5 I-4 I-3 6 I-4 I-3 7 I-3 I-4 8 I-4 I-3 9 I-4 I-3 10 I-4 Wasted cycles Superscalar (two or more execution cycles)

4 Modes of Operation Protected Mode Protected mode is the native state of the processor, in which all instructions and features are available. Programs are given separate memory areas called segments. Used by Windows. 4 GB of addressable memory. Real-address Mode Used by MS-DOS. 1 MB of addressable memory. Only one program can run at a time. Uses 20-bit linear addresses ranging from 0 to FFFFF. 8000: = Virtual-8086 Mode A hybrid of protected and real-address mode where each program is given its own realaddress computer. Registers Registers are high-speed storage locations directly inside the CPU, designed to be accessed at much higher speed than conventional memory. 32-bit General-Purpose Registers EAX EBX ECX EDX EBP ESP ESI EDI 16-bit Segment Registers EFLAGS EIP CS SS DS ES FS GS

5 Specialized uses EAX accumulator ECX loop counter ESP addresses data on the stack ESI, EDI memory transfer instructions EBP extended frame pointer EIP instruction pointer Status flags Status flags reflect the outcomes of arithmetic and logical operations performed by the CPU. The carry flag (CF) is set when the result of an unsigned arithmetic operation is too large to fit into the destination. The overflow flag (OF) is set when the result of a signed arithmetic operation is too wide to fit into the destination. The sign flag (SF) is set when the result of an arithmetic or logical operation generates a negative result. The zero flag (ZF) is set when the result of an arithmetic or logical operation generates a result of zero. The auxiliary carry flag is set when an arithmetic operation causes a carry from bit 3 to bit 4 in an 8-bit operand. The parity flag sums the number of bits that are set in a number, and indicates whether the sum is odd or even. Chapter 3 Basic Elements of Assembly Language Integer constants An integer constant is made up of an optional leading sign, one or more digits, and an optional suffix character called a radix. The radix may be o H hexadecimal o D decimal o B binary o Etc A hexadecimal constant beginning with a letter must have a leading zero. Integer expressions An integer expression is a mathematical expression involving integer values and arithmetic operators. Example: 16 / 5 3

6 Character constants A character constant is a single character enclosed in either single or double quotes. Example: A d String constants A string constant is a string of characters enclosed in either single or double quotes. Example: I m going to ace this final Reserved words Assembly has a list of words called reserved words which have special meaning and can only be used in their correct context. Identifiers An identifier is a programmer-chosen name. It might identify a variable, a constant, a procedure, or a code label. Directives A directive is a command that is recognized and acted upon by the assembler. Directives are part of the assembler s syntax, but are not related to the Intel instruction set. Instructions An instruction is a statement that is executed by the processor at runtime after the program has been loaded into memory and started. An instruction has four basic parts: o Label (optional) o Instruction mnemonic (required) o Operand(s) (usually required) o Comment (optional) Program Template TITLE Program Template INCLUDE Irvine32.inc.data ; (insert variables here).code main PROC ; (insert executable instructions here) exit main ENDP

7 ; (insert additional procedures here) END main Defining Data Intrinsic data types BYTE, SBYTE (8-bit) WORD, SWORD (16-bit) DWORD, SDWORD (32-bit) FWORD (48-bit) QWORD (64-bit) TBYTE (80-bit) Data definition statement A data definition statement sets aside storage in memory for a variable and may optionally assign a name to the variable. Examples of defining data o Value1 BYTE A o Value2 SBYTE -100 o Value3 BYTE? ;uninitialized o List BYTE 10,20,30,40,50 o String BYTE Good day,0 o List BYTE DUP(0) ;20 bytes, all equal to zero Little endian order All data types larger than a byte store their individual bytes in reverse order. The least significant byte occurs at the first (lowest) memory address. val1 DWORD h

8 Symbolic constants A symbolic constant is created by associating an identifier (a symbol) and either an integer expression or some text. Equal-sign directive o The equal-sign directive associates a symbol name with an integer expression. o Syntax: name = expression o Example: COUNT = 500; mov al,count o When a program is assembled, all occurrences of name are replaced by expression during the assembler s pre-processor step. o Can be redefined any number of times. EQU directive o The EQU directive associates a symbolic name with either an integer expression or some arbitrary text. o Syntax: name EQU expression o Example: presskey EQU < Press any key to continue,0> ;at top, before.data o Can not be redefined later. TEXTEQU directive o A text macro. o Example: count TEXTEQU %(5*2) ;same as count TEXTEQU <10> o Can be redefined later in the program Chapter 4 Data Transfer MOV Instruction The MOV instruction copies data from a source operand to a destination operand. MOV destination, source MOVZX Copies the contents of the source operand into a destination operand and zeroextends the value to either 16 or 32 bits. MOVSX Copies the contents of a source operand into a destination operand and signextends the value to either 16 or 32 bits. XCHG Exchanges the contents of two operands

9 Addition and Subtraction INC and DEC Adds 1 or subtracts 1 ADD Adds a source operand to a destination operand of the same size. SUB Subtracts a source operand from a destination operand. NEG Reverses the sign of a number by converting it to its two s compliment Data-related Operators The OFFSET operator returns the distance of a variable from the beginning of its enclosing segment. The PTR operator lets you override a variable s default size. The TYPE operator returns the size (in bytes) of each element in an array. The LENGTHOF operator returns the number of elements in an array. The SIZEOF operator returns the number of bytes used by an array initializer. Indirect Addressing MOV esi, OFFSET array MOV al, [esi] INC esi MOV al, [esi] JMP and LOOP JMP The JMP instruction causes an unconditional transfer to a target location inside the code segment. The location must be identified by a code label, which is translated by the assembler into an address. JMP targetlabel LOOP The LOOP instruction provides a simple way to repeat a block of statements a specific number of times. ECX is automatically used as a counter and is decremented each time the loop repeats. LOOP destination

10 Chapter 5 Select Procedures from Irvine32.inc DumpMem MOV esi, OFFSET array MOV ecx, LENGTHOF array MOV ebx, TYPE array call DumpMem All Read procedures save to EAX, AX, or AL. ReadString MOV edx, OFFSET string MOV ecx, (SIZEOF string) 1 call ReadString MOV bytecount, eax SetTextColor MOV eax, white + (blue *16) ;white on blue call SetTextColor All Write procedures output from EAX, AX, or AL. WriteString MOV edx, OFFSET prompt call WriteString Stack Operations PUSH A 32-bit PUSH operation decrements the stack pointer (ESP) by 4 and copies a value into the location in the stack pointed to by the stack pointer. There is also a 16-bit version. POP A POP operation removes a value from the stack and places it in a register or variable. PUSHFD, POPFD Pushes or pops from EFLAGS.

11 PUSHAD, PUSHA, POPAD, POPA The PUSHAD instruction pushes all of the 32-bit general-purpose registers on the stack. The POPAD instruction pops the same registers off the stack in reverse order. The PUSHA instruction pushes the 16-bit registers on the stack. The POPA instruction pops the same registers. Procedures PROC directive A procedure is a named block of statements that ends in a return statement. Example: o Sample PROC o o ret o sample ENDP CALL and RET The CALL instruction calls a procedure by directing the processor to begin execution at a new memory location. The procedure uses a RET instruction to bring the processor back to the point in the program where the procedure was called. Local Labels and Global Labels A code label (followed by a single colon) has a local scope, making it visible only to statements inside its enclosing procedure. A global label allows control to be transferred to labels outside the current procedure. To do this, follow the label name with two colons. USES Operator The USES operator, coupled with the PROC directive, lets you list the names of all the registers modified within a procedure. The procedure saves the registers to the stack before the procedure runs, then restores them afterwards.

12 Chapter 6 AND The AND instruction performs a Boolean (bitwise) AND operation between each pair of matching bits in two operands and places the result in the destination operand. AND destination, source If both bits equal 1, the result bit is 1; otherwise, it is 0. The AND instruction always clears the Overflow and Carry flags. It modifies the Sign, Zero, and Parity flags according to the value of the destination operand. OR The OR instruction performs a Boolean OR operation between each pair of matching bits in two operands and places the result in the destination operand. OR destination, source The OR instruction always clears the Carry and Overflow flags. It modifies the Sign, Zero, and Parity flags according to the value of the destination operand. XOR The XOR instruction performs a Boolean exclusive-or operation between each pair of matching bits in two operands, and stores the result in the destination operand. XOR destination, source The XOR instruction always clears the Overflow and Carry flags. It modifies the Sign, Zero, and Parity flags according to the value of the destination operand. NOT The NOT instruction toggles all bits in an operand. No flags are affected by the NOT instruction. TEST The TEST instruction performs an implied AND operation between each pair of matching bits in two operands and sets the flags accordingly. The only difference between TEST and AND is that TEST does not modify the destination operand. CMP The CMP instruction performs an implied subtraction of a source operand from a destination operand. Neither operand is modified. The CMP instruction changes the Overflow, Sign, Zero, Auxiliary Carry, and Parity flags according to the value the destination operand would have had if the SUB instruction were used. STC sets the carry flag CLC clears the carry flag

13 Conditional Jumps Jumps Based on Specific Flag Values JZ Jump if zero ZF = 1 JNZ Jump if not zero ZF = 0 JC Jump if carry CF = 1 JNC Jump if not carry CF = 0 JO Jump if overflow OF = 1 JNO Jump if not overflow OF = 0 JS Jump if signed SF = 1 JNS Jump if not signed SF = 0 JP Jump if parity PF = 1 JNP Jump if not parity PF = 0 Jumps Based on Equality JE Jump if equal JNE Jump if not equal JCXZ Jump if CX = 0 JECXZ Jump if ECX = 0 Jumps Based on Unsigned Comparisons JA JNBE JAE JNB JB JNAE JBE JNA Jumps Based on Signed Comparisons JG JNLE JGE JNL JL JNGE JLE JNG Jump if above Jump if not below or equal Jump if above or equal Jump if not below Jump if below Jump if not above or equal Jump if below or equal Jump if not above Jump if greater Jump if not less than or equal Jump if greater than or equal Jump if not less Jump if less Jump if not greater than or equal Jump if less than or equal Jump if not greater

14 Conditional Loops LOOPZ and LOOPE The LOOPZ instruction permits a loop to continue while the Zero flag is set and the unsigned value of ECX is greater than zero. The LOOPE (loop if equal) instruction is equivalent to LOOPZ. LOOPNZ and LOOPNE The LOOPNZ instruction permits a loop to continue while the unsigned value of ECX is greater than zero and the Zero flag is clear. The LOOPNE (loop if not equal) instruction is equivalent. Chapter 7 Shift and Rotate Instructions SHL The SHL instruction performs a logical left shift on the destination operand, filling the lowest bit with 0. The highest bit is moved to the Carry flag, and the bit that was in the Carry flag is lost. SHL destination, count SHR The SHR instruction performs a logical right shift on the destination operand, replacing the highest bit with a 0. The lowest bit is copied to the Carry flag, and the bit that was in the Carry flag is lost. SAL and SAR SAL (shift arithmetic left) is identical to the SHL instruction. The SAR instruction performs a right arithmetic shift on its destination operand. Rather than 0 placed in the first bit, a 0 or 1 is put there, depending on the sign of the operand. ROL The ROL instruction shifts each bit to the left. The highest bit is copied both into the Carry flag and into the lowest bit. ROR The ROR instruction shifts each bit to the right. The lowest bit is copied into the Carry flag and into the highest bit at the same time. RCL The RCL instruction shifts each bit to the left, copies the Carry flag to the least significant bit, and copies the most significant bit to the Carry flag. Think of the Carry flag as just an extra bit added to the high end of the number.

15 RCR The RCR instruction shifts each bit to the right, copies the Carry flag into the most significant bit, and copies the least significant bit into the Carry flag. SHLD The SHLD (shift left double) instruction shifts a destination operand a given number of bits to the left. The bit positions opened up by the shift are filled by the most significant bits of the source operand. The source operand is not affected, but the Sign, Zero, Auxiliary, Parity, and Carry flags are affected. SHRD The SHRD (shift right double) instruction shifts a destination operand a given number of bits to the right. The bit positions opened up by the shift are filled by the least significant bits of the source operand. Multiplication and Division Instructions MUL The MUL (unsigned multiplication) instruction multiplies an 8-, 16-, or 32-bit operand by either AL, AX, or EAX. AL r/m8 AX AX r/m16 DX:AX EAX r/m32 EDX:EAX The MUL instruction sets Carry and Overflow flags if the upper half of the product is not equal to zero. IMUL The IMUL instruction performs signed integer multiplication. IMUL sets the Carry and Overflow flags if the high-order product is not a sign extension of the low-order product. DIV The DIV (unsigned divide) instruction performs 8-bit, 16-bit, and 32-bit division on unsigned integers. Quotient Remainder AX r/m8 AL AH DX:AX r/m16 AX DX EDX:EAX r/m32 EAX EDX IDIV The IDIV (signed divide) instruction performs signed integer division. For both DIV and IDIV, all the arithmetic status flags are undefined after the operation.

16 Extended Addition and Subtraction ADC The ADC (add with carry) instruction adds both a source operand and the contents of the Carry flag to a destination operand. SBB The SBB (subtract with borrow) instruction subtracts both a source operand and the value of the Carry flag from a destination operand. Chapter 8 Local Variables A local variable is a variable that is created, used, and destroyed within a single procedure. LOCAL directive The LOCAL directive declares one or more local variables inside a procedure. It must be placed on the line immediately following a PROC directive. LOCAL varname:byte, var2:dword Stack Parameters INVOKE directive The INVOKE directive is a more powerful replacement for Intel s CALL instruction that lets you pass multiple arguments. ADDR operator The ADDR operator can be used to pass a pointer when calling a procedure with the INVOKE directive. INVOKE fillarray, ADDR myarray PROC directive The PROC directive permits you to declare a procedure name with a list of named parameters. PROTO directive The PROTO directive creates a prototype for an existing procedure. A prototype declares a procedure s name and parameter list. It allows you to call a procedure before defining it.

17 PROTO mysub INVOKE mysub mysub PROC mysub ENDP Stack Frames The stack frame is the area of the stack set aside for a procedure s return address, passed parameters, any saved registers, and local variables. Chapter 10 Structures A structure is a template or pattern given to a logically related group of variables. The individual variables in the structure are called fields. Program statements can access the structure as a single entity, or they can access individual fields. Coord STRUCT X WORD? Y WORD? Coord ENDS Point Coord <5,10> TYPE Point.X ; 2 Unions Whereas each field in a structure has an offset relative to the first byte of the structure, all the fields in a union start at the same offset. The field declarations in a union follow the same rules as for structures, except that each field can have only a single initializer. Macros A macro procedure is a named block of assembly language statements. Newline MACRO Call crlf ENDM Invoking macros Macroname arg1, arg2

Complete 8086 instruction set

Complete 8086 instruction set Page 1 of 53 Complete 8086 instruction set Quick reference: AAA AAD AAM AAS ADC ADD AND CALL CBW CLC CLD CLI CMC CMP CMPSB CMPSW CWD DAA DAS DEC DIV HLT IDIV IMUL IN INC INT INTO I JA JAE JB JBE JC JCXZ

More information

x64 Cheat Sheet Fall 2015

x64 Cheat Sheet Fall 2015 CS 33 Intro Computer Systems Doeppner x64 Cheat Sheet Fall 2015 1 x64 Registers x64 assembly code uses sixteen 64-bit registers. Additionally, the lower bytes of some of these registers may be accessed

More information

Systems Design & Programming Data Movement Instructions. Intel Assembly

Systems Design & Programming Data Movement Instructions. Intel Assembly Intel Assembly Data Movement Instruction: mov (covered already) push, pop lea (mov and offset) lds, les, lfs, lgs, lss movs, lods, stos ins, outs xchg, xlat lahf, sahf (not covered) in, out movsx, movzx

More information

CS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 20: Stack Frames 7 March 08

CS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 20: Stack Frames 7 March 08 CS412/CS413 Introduction to Compilers Tim Teitelbaum Lecture 20: Stack Frames 7 March 08 CS 412/413 Spring 2008 Introduction to Compilers 1 Where We Are Source code if (b == 0) a = b; Low-level IR code

More information

A Tiny Guide to Programming in 32-bit x86 Assembly Language

A Tiny Guide to Programming in 32-bit x86 Assembly Language CS308, Spring 1999 A Tiny Guide to Programming in 32-bit x86 Assembly Language by Adam Ferrari, ferrari@virginia.edu (with changes by Alan Batson, batson@virginia.edu and Mike Lack, mnl3j@virginia.edu)

More information

X86-64 Architecture Guide

X86-64 Architecture Guide X86-64 Architecture Guide For the code-generation project, we shall expose you to a simplified version of the x86-64 platform. Example Consider the following Decaf program: class Program { int foo(int

More information

Computer Organization and Assembly Language

Computer Organization and Assembly Language Computer Organization and Assembly Language Lecture 8 - Strings and Arrays Introduction We already know that assembly code will execute significantly faster than code written in a higher-level language

More information

CS61: Systems Programing and Machine Organization

CS61: Systems Programing and Machine Organization CS61: Systems Programing and Machine Organization Fall 2009 Section Notes for Week 2 (September 14 th - 18 th ) Topics to be covered: I. Binary Basics II. Signed Numbers III. Architecture Overview IV.

More information

The 80x86 Instruction Set

The 80x86 Instruction Set Thi d t t d ith F M k 4 0 2 The 80x86 Instruction Set Chapter Six Until now, there has been little discussion of the instructions available on the 80x86 microprocessor. This chapter rectifies this situation.

More information

Overview of IA-32 assembly programming. Lars Ailo Bongo University of Tromsø

Overview of IA-32 assembly programming. Lars Ailo Bongo University of Tromsø Overview of IA-32 assembly programming Lars Ailo Bongo University of Tromsø Contents 1 Introduction... 2 2 IA-32 assembly programming... 3 2.1 Assembly Language Statements... 3 2.1 Modes...4 2.2 Registers...4

More information

Computer Organization and Architecture

Computer Organization and Architecture Computer Organization and Architecture Chapter 11 Instruction Sets: Addressing Modes and Formats Instruction Set Design One goal of instruction set design is to minimize instruction length Another goal

More information

MICROPROCESSOR AND MICROCOMPUTER BASICS

MICROPROCESSOR AND MICROCOMPUTER BASICS Introduction MICROPROCESSOR AND MICROCOMPUTER BASICS At present there are many types and sizes of computers available. These computers are designed and constructed based on digital and Integrated Circuit

More information

8085 INSTRUCTION SET

8085 INSTRUCTION SET DATA TRANSFER INSTRUCTIONS Opcode Operand Description 8085 INSTRUCTION SET INSTRUCTION DETAILS Copy from source to destination OV Rd, Rs This instruction copies the contents of the source, Rs register

More information

Faculty of Engineering Student Number:

Faculty of Engineering Student Number: Philadelphia University Student Name: Faculty of Engineering Student Number: Dept. of Computer Engineering Final Exam, First Semester: 2012/2013 Course Title: Microprocessors Date: 17/01//2013 Course No:

More information

Intel 8086 architecture

Intel 8086 architecture Intel 8086 architecture Today we ll take a look at Intel s 8086, which is one of the oldest and yet most prevalent processor architectures around. We ll make many comparisons between the MIPS and 8086

More information

MACHINE ARCHITECTURE & LANGUAGE

MACHINE ARCHITECTURE & LANGUAGE in the name of God the compassionate, the merciful notes on MACHINE ARCHITECTURE & LANGUAGE compiled by Jumong Chap. 9 Microprocessor Fundamentals A system designer should consider a microprocessor-based

More information

64-Bit NASM Notes. Invoking 64-Bit NASM

64-Bit NASM Notes. Invoking 64-Bit NASM 64-Bit NASM Notes The transition from 32- to 64-bit architectures is no joke, as anyone who has wrestled with 32/64 bit incompatibilities will attest We note here some key differences between 32- and 64-bit

More information

1 Classical Universal Computer 3

1 Classical Universal Computer 3 Chapter 6: Machine Language and Assembler Christian Jacob 1 Classical Universal Computer 3 1.1 Von Neumann Architecture 3 1.2 CPU and RAM 5 1.3 Arithmetic Logical Unit (ALU) 6 1.4 Arithmetic Logical Unit

More information

Unpacked BCD Arithmetic. BCD (ASCII) Arithmetic. Where and Why is BCD used? From the SQL Server Manual. Packed BCD, ASCII, Unpacked BCD

Unpacked BCD Arithmetic. BCD (ASCII) Arithmetic. Where and Why is BCD used? From the SQL Server Manual. Packed BCD, ASCII, Unpacked BCD BCD (ASCII) Arithmetic The Intel Instruction set can handle both packed (two digits per byte) and unpacked BCD (one decimal digit per byte) We will first look at unpacked BCD Unpacked BCD can be either

More information

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2 Lecture Handout Computer Architecture Lecture No. 2 Reading Material Vincent P. Heuring&Harry F. Jordan Chapter 2,Chapter3 Computer Systems Design and Architecture 2.1, 2.2, 3.2 Summary 1) A taxonomy of

More information

BCD (ASCII) Arithmetic. Where and Why is BCD used? Packed BCD, ASCII, Unpacked BCD. BCD Adjustment Instructions AAA. Example

BCD (ASCII) Arithmetic. Where and Why is BCD used? Packed BCD, ASCII, Unpacked BCD. BCD Adjustment Instructions AAA. Example BCD (ASCII) Arithmetic We will first look at unpacked BCD which means strings that look like '4567'. Bytes then look like 34h 35h 36h 37h OR: 04h 05h 06h 07h x86 processors also have instructions for packed

More information

CHAPTER 7: The CPU and Memory

CHAPTER 7: The CPU and Memory CHAPTER 7: The CPU and Memory The Architecture of Computer Hardware, Systems Software & Networking: An Information Technology Approach 4th Edition, Irv Englander John Wiley and Sons 2010 PowerPoint slides

More information

Instruction Set Architecture

Instruction Set Architecture CS:APP Chapter 4 Computer Architecture Instruction Set Architecture Randal E. Bryant adapted by Jason Fritts http://csapp.cs.cmu.edu CS:APP2e Hardware Architecture - using Y86 ISA For learning aspects

More information

MICROPROCESSOR. Exclusive for IACE Students www.iace.co.in iacehyd.blogspot.in Ph: 9700077455/422 Page 1

MICROPROCESSOR. Exclusive for IACE Students www.iace.co.in iacehyd.blogspot.in Ph: 9700077455/422 Page 1 MICROPROCESSOR A microprocessor incorporates the functions of a computer s central processing unit (CPU) on a single Integrated (IC), or at most a few integrated circuit. It is a multipurpose, programmable

More information

PART B QUESTIONS AND ANSWERS UNIT I

PART B QUESTIONS AND ANSWERS UNIT I PART B QUESTIONS AND ANSWERS UNIT I 1. Explain the architecture of 8085 microprocessor? Logic pin out of 8085 microprocessor Address bus: unidirectional bus, used as high order bus Data bus: bi-directional

More information

8. MACROS, Modules, and Mouse

8. MACROS, Modules, and Mouse 8. MACROS, Modules, and Mouse Background Macros, Modules and the Mouse is a combination of concepts that will introduce you to modular programming while learning how to interface with the mouse. Macros

More information

Assembly Language Tutorial

Assembly Language Tutorial Assembly Language Tutorial ASSEMBLY LANGUAGE TUTORIAL by tutorialspoint.com tutorialspoint.com i ABOUT THE TUTORIAL Assembly Programming Tutorial Assembly language is a low-level programming language for

More information

Z80 Instruction Set. Z80 Assembly Language

Z80 Instruction Set. Z80 Assembly Language 75 Z80 Assembly Language The assembly language allows the user to write a program without concern for memory addresses or machine instruction formats. It uses symbolic addresses to identify memory locations

More information

CHAPTER 6 TASK MANAGEMENT

CHAPTER 6 TASK MANAGEMENT CHAPTER 6 TASK MANAGEMENT This chapter describes the IA-32 architecture s task management facilities. These facilities are only available when the processor is running in protected mode. 6.1. TASK MANAGEMENT

More information

Machine-Level Programming II: Arithmetic & Control

Machine-Level Programming II: Arithmetic & Control Mellon Machine-Level Programming II: Arithmetic & Control 15-213 / 18-213: Introduction to Computer Systems 6 th Lecture, Jan 29, 2015 Instructors: Seth Copen Goldstein, Franz Franchetti, Greg Kesden 1

More information

Assembly Language: Function Calls" Jennifer Rexford!

Assembly Language: Function Calls Jennifer Rexford! Assembly Language: Function Calls" Jennifer Rexford! 1 Goals of this Lecture" Function call problems:! Calling and returning! Passing parameters! Storing local variables! Handling registers without interference!

More information

Intel Architecture Software Developer s Manual

Intel Architecture Software Developer s Manual Intel Architecture Software Developer s Manual Volume 1: Basic Architecture NOTE: The Intel Architecture Software Developer s Manual consists of three volumes: Basic Architecture, Order Number 243190;

More information

Return-oriented programming without returns

Return-oriented programming without returns Faculty of Computer Science Institute for System Architecture, Operating Systems Group Return-oriented programming without urns S. Checkoway, L. Davi, A. Dmitrienko, A. Sadeghi, H. Shacham, M. Winandy

More information

Chapter 5 Instructor's Manual

Chapter 5 Instructor's Manual The Essentials of Computer Organization and Architecture Linda Null and Julia Lobur Jones and Bartlett Publishers, 2003 Chapter 5 Instructor's Manual Chapter Objectives Chapter 5, A Closer Look at Instruction

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer About the Tutorial Assembly language is a low-level programming language for a computer or other programmable device specific to a particular computer architecture in contrast to most high-level programming

More information

CS:APP Chapter 4 Computer Architecture Instruction Set Architecture. CS:APP2e

CS:APP Chapter 4 Computer Architecture Instruction Set Architecture. CS:APP2e CS:APP Chapter 4 Computer Architecture Instruction Set Architecture CS:APP2e Instruction Set Architecture Assembly Language View Processor state Registers, memory, Instructions addl, pushl, ret, How instructions

More information

How It All Works. Other M68000 Updates. Basic Control Signals. Basic Control Signals

How It All Works. Other M68000 Updates. Basic Control Signals. Basic Control Signals CPU Architectures Motorola 68000 Several CPU architectures exist currently: Motorola Intel AMD (Advanced Micro Devices) PowerPC Pick one to study; others will be variations on this. Arbitrary pick: Motorola

More information

Instruction Set Architecture (ISA)

Instruction Set Architecture (ISA) Instruction Set Architecture (ISA) * Instruction set architecture of a machine fills the semantic gap between the user and the machine. * ISA serves as the starting point for the design of a new machine

More information

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX Overview CISC Developments Over Twenty Years Classic CISC design: Digital VAX VAXÕs RISC successor: PRISM/Alpha IntelÕs ubiquitous 80x86 architecture Ð 8086 through the Pentium Pro (P6) RJS 2/3/97 Philosophy

More information

M A S S A C H U S E T T S I N S T I T U T E O F T E C H N O L O G Y DEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE

M A S S A C H U S E T T S I N S T I T U T E O F T E C H N O L O G Y DEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE M A S S A C H U S E T T S I N S T I T U T E O F T E C H N O L O G Y DEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE 1. Introduction 6.004 Computation Structures β Documentation This handout is

More information

Notes on Assembly Language

Notes on Assembly Language Notes on Assembly Language Brief introduction to assembly programming The main components of a computer that take part in the execution of a program written in assembly code are the following: A set of

More information

Abysssec Research. 1) Advisory information. 2) Vulnerable version

Abysssec Research. 1) Advisory information. 2) Vulnerable version Abysssec Research 1) Advisory information Title Version Discovery Vendor Impact Contact Twitter CVE : Apple QuickTime FlashPix NumberOfTiles Remote Code Execution Vulnerability : QuickTime player 7.6.5

More information

The string of digits 101101 in the binary number system represents the quantity

The string of digits 101101 in the binary number system represents the quantity Data Representation Section 3.1 Data Types Registers contain either data or control information Control information is a bit or group of bits used to specify the sequence of command signals needed for

More information

The x86 PC: Assembly Language, Design, and Interfacing 5 th Edition

The x86 PC: Assembly Language, Design, and Interfacing 5 th Edition Online Instructor s Manual to accompany The x86 PC: Assembly Language, Design, and Interfacing 5 th Edition Muhammad Ali Mazidi Janice Gillispie Mazidi Danny Causey Prentice Hall Boston Columbus Indianapolis

More information

IA-32 Intel Architecture Software Developer s Manual

IA-32 Intel Architecture Software Developer s Manual IA-32 Intel Architecture Software Developer s Manual Volume 2B: Instruction Set Reference, N-Z NOTE: The IA-32 Intel Architecture Software Developer s Manual consists of four volumes: Basic Architecture,

More information

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language Chapter 4 Register Transfer and Microoperations Section 4.1 Register Transfer Language Digital systems are composed of modules that are constructed from digital components, such as registers, decoders,

More information

Lecture 7: Machine-Level Programming I: Basics Mohamed Zahran (aka Z) mzahran@cs.nyu.edu http://www.mzahran.com

Lecture 7: Machine-Level Programming I: Basics Mohamed Zahran (aka Z) mzahran@cs.nyu.edu http://www.mzahran.com CSCI-UA.0201-003 Computer Systems Organization Lecture 7: Machine-Level Programming I: Basics Mohamed Zahran (aka Z) mzahran@cs.nyu.edu http://www.mzahran.com Some slides adapted (and slightly modified)

More information

(Refer Slide Time: 00:01:16 min)

(Refer Slide Time: 00:01:16 min) Digital Computer Organization Prof. P. K. Biswas Department of Electronic & Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture No. # 04 CPU Design: Tirning & Control

More information

PC Assembly Language. Paul A. Carter

PC Assembly Language. Paul A. Carter PC Assembly Language Paul A. Carter November 20, 2001 Copyright c 2001 by Paul Carter This may be reproduced and distributed in its entirety (including this authorship, copyright and permission notice),

More information

IA-32 Intel Architecture Software Developer s Manual

IA-32 Intel Architecture Software Developer s Manual IA-32 Intel Architecture Software Developer s Manual Volume 1: Basic Architecture NOTE: The IA-32 Intel Architecture Software Developer s Manual consists of three volumes: Basic Architecture, Order Number

More information

Software Fingerprinting for Automated Malicious Code Analysis

Software Fingerprinting for Automated Malicious Code Analysis Software Fingerprinting for Automated Malicious Code Analysis Philippe Charland Mission Critical Cyber Security Section October 25, 2012 Terms of Release: This document is approved for release to Defence

More information

Character Translation Methods

Character Translation Methods Supplement to: Irvine, Kip R. Assembly Language for Intel-Based Computers, 4th Edition. This file may be duplicated or printed for classroom use, as long as the author name, book title, and copyright notice

More information

PROBLEMS (Cap. 4 - Istruzioni macchina)

PROBLEMS (Cap. 4 - Istruzioni macchina) 98 CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS PROBLEMS (Cap. 4 - Istruzioni macchina) 2.1 Represent the decimal values 5, 2, 14, 10, 26, 19, 51, and 43, as signed, 7-bit numbers in the following binary

More information

l C-Programming l A real computer language l Data Representation l Everything goes down to bits and bytes l Machine representation Language

l C-Programming l A real computer language l Data Representation l Everything goes down to bits and bytes l Machine representation Language 198:211 Computer Architecture Topics: Processor Design Where are we now? C-Programming A real computer language Data Representation Everything goes down to bits and bytes Machine representation Language

More information

Hacking Techniques & Intrusion Detection. Ali Al-Shemery arabnix [at] gmail

Hacking Techniques & Intrusion Detection. Ali Al-Shemery arabnix [at] gmail Hacking Techniques & Intrusion Detection Ali Al-Shemery arabnix [at] gmail All materials is licensed under a Creative Commons Share Alike license http://creativecommonsorg/licenses/by-sa/30/ # whoami Ali

More information

ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER

ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER Pierre A. von Kaenel Mathematics and Computer Science Department Skidmore College Saratoga Springs, NY 12866 (518) 580-5292 pvonk@skidmore.edu ABSTRACT This paper

More information

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek Instruction Set Architecture or How to talk to computers if you aren t in Star Trek The Instruction Set Architecture Application Compiler Instr. Set Proc. Operating System I/O system Instruction Set Architecture

More information

Analysis of Win32.Scream

Analysis of Win32.Scream Analysis of Win32.Scream 1. Introduction Scream is a very interesting virus as it combines a lot of techniques written inside of it. In this paper I ll cover all of its features and internals. I ll dissect

More information

INTRODUCTION TO MALWARE & MALWARE ANALYSIS

INTRODUCTION TO MALWARE & MALWARE ANALYSIS INTRODUCTION TO MALWARE & MALWARE ANALYSIS by Quick Heal R&D lab Security Simplified INTRODUCTION Very often people call everything that corrupts their system a virus without being aware about what it

More information

a storage location directly on the CPU, used for temporary storage of small amounts of data during processing.

a storage location directly on the CPU, used for temporary storage of small amounts of data during processing. CS143 Handout 18 Summer 2008 30 July, 2008 Processor Architectures Handout written by Maggie Johnson and revised by Julie Zelenski. Architecture Vocabulary Let s review a few relevant hardware definitions:

More information

Off-by-One exploitation tutorial

Off-by-One exploitation tutorial Off-by-One exploitation tutorial By Saif El-Sherei www.elsherei.com Introduction: I decided to get a bit more into Linux exploitation, so I thought it would be nice if I document this as a good friend

More information

CPU Organization and Assembly Language

CPU Organization and Assembly Language COS 140 Foundations of Computer Science School of Computing and Information Science University of Maine October 2, 2015 Outline 1 2 3 4 5 6 7 8 Homework and announcements Reading: Chapter 12 Homework:

More information

An Introduction to Assembly Programming with the ARM 32-bit Processor Family

An Introduction to Assembly Programming with the ARM 32-bit Processor Family An Introduction to Assembly Programming with the ARM 32-bit Processor Family G. Agosta Politecnico di Milano December 3, 2011 Contents 1 Introduction 1 1.1 Prerequisites............................. 2

More information

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC6504 - Microprocessor & Microcontroller Year/Sem : II/IV

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC6504 - Microprocessor & Microcontroller Year/Sem : II/IV DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC6504 - Microprocessor & Microcontroller Year/Sem : II/IV UNIT I THE 8086 MICROPROCESSOR 1. What is the purpose of segment registers

More information

Comp 255Q - 1M: Computer Organization Lab #3 - Machine Language Programs for the PDP-8

Comp 255Q - 1M: Computer Organization Lab #3 - Machine Language Programs for the PDP-8 Comp 255Q - 1M: Computer Organization Lab #3 - Machine Language Programs for the PDP-8 January 22, 2013 Name: Grade /10 Introduction: In this lab you will write, test, and execute a number of simple PDP-8

More information

Systems I: Computer Organization and Architecture

Systems I: Computer Organization and Architecture Systems I: Computer Organization and Architecture Lecture : Microprogrammed Control Microprogramming The control unit is responsible for initiating the sequence of microoperations that comprise instructions.

More information

Administration. Instruction scheduling. Modern processors. Examples. Simplified architecture model. CS 412 Introduction to Compilers

Administration. Instruction scheduling. Modern processors. Examples. Simplified architecture model. CS 412 Introduction to Compilers CS 4 Introduction to Compilers ndrew Myers Cornell University dministration Prelim tomorrow evening No class Wednesday P due in days Optional reading: Muchnick 7 Lecture : Instruction scheduling pr 0 Modern

More information

Computer Science 281 Binary and Hexadecimal Review

Computer Science 281 Binary and Hexadecimal Review Computer Science 281 Binary and Hexadecimal Review 1 The Binary Number System Computers store everything, both instructions and data, by using many, many transistors, each of which can be in one of two

More information

Using Heap Allocation in Intel Assembly Language

Using Heap Allocation in Intel Assembly Language Using Heap Allocation in Intel Assembly Language Copyright 2005, Kip R. Irvine. All rights reserved. Dynamic memory allocation is a feature we take for granted in high-level languages such as C++ and Java.

More information

2) Write in detail the issues in the design of code generator.

2) Write in detail the issues in the design of code generator. COMPUTER SCIENCE AND ENGINEERING VI SEM CSE Principles of Compiler Design Unit-IV Question and answers UNIT IV CODE GENERATION 9 Issues in the design of code generator The target machine Runtime Storage

More information

ASSEMBLY LANGUAGE PROGRAMMING (6800) (R. Horvath, Introduction to Microprocessors, Chapter 6)

ASSEMBLY LANGUAGE PROGRAMMING (6800) (R. Horvath, Introduction to Microprocessors, Chapter 6) ASSEMBLY LANGUAGE PROGRAMMING (6800) (R. Horvath, Introduction to Microprocessors, Chapter 6) 1 COMPUTER LANGUAGES In order for a computer to be able to execute a program, the program must first be present

More information

MACHINE INSTRUCTIONS AND PROGRAMS

MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER OBJECTIVES In this chapter you will learn about: Machine instructions and program execution, including branching and subroutine call and return operations

More information

150127-Microprocessor & Assembly Language

150127-Microprocessor & Assembly Language Chapter 3 Z80 Microprocessor Architecture The Z 80 is one of the most talented 8 bit microprocessors, and many microprocessor-based systems are designed around the Z80. The Z80 microprocessor needs an

More information

Typy danych. Data types: Literals:

Typy danych. Data types: Literals: Lab 10 MIPS32 Typy danych Data types: Instructions are all 32 bits byte(8 bits), halfword (2 bytes), word (4 bytes) a character requires 1 byte of storage an integer requires 1 word (4 bytes) of storage

More information

CPU performance monitoring using the Time-Stamp Counter register

CPU performance monitoring using the Time-Stamp Counter register CPU performance monitoring using the Time-Stamp Counter register This laboratory work introduces basic information on the Time-Stamp Counter CPU register, which is used for performance monitoring. The

More information

Chapter 7D The Java Virtual Machine

Chapter 7D The Java Virtual Machine This sub chapter discusses another architecture, that of the JVM (Java Virtual Machine). In general, a VM (Virtual Machine) is a hypothetical machine (implemented in either hardware or software) that directly

More information

How To Use A Computer With A Screen On It (For A Powerbook)

How To Use A Computer With A Screen On It (For A Powerbook) page 44,100 TITLE ASMXMPLE Video equ 10h ;video functions interrupt number Keyboard equ 16h ;keyboard functions interrupt number DOS equ 21h ;call DOS interrupt number PrtSc equ 5h ;Print Screen Bios interrupt

More information

Administrative Issues

Administrative Issues CSC 3210 Computer Organization and Programming Introduction and Overview Dr. Anu Bourgeois (modified by Yuan Long) Administrative Issues Required Prerequisites CSc 2010 Intro to CSc CSc 2310 Java Programming

More information

High-speed image processing algorithms using MMX hardware

High-speed image processing algorithms using MMX hardware High-speed image processing algorithms using MMX hardware J. W. V. Miller and J. Wood The University of Michigan-Dearborn ABSTRACT Low-cost PC-based machine vision systems have become more common due to

More information

esrever gnireenigne tfosorcim seiranib

esrever gnireenigne tfosorcim seiranib esrever gnireenigne tfosorcim seiranib Alexander Sotirov asotirov@determina.com CanSecWest / core06 Reverse Engineering Microsoft Binaries Alexander Sotirov asotirov@determina.com CanSecWest / core06 Overview

More information

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING UNIT 1 - INTRODUCTION JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ Unit 1.MaNoTaS 1 Definitions (I) Description A computer is: A

More information

IA-32 Intel Architecture Software Developer s Manual

IA-32 Intel Architecture Software Developer s Manual IA-32 Intel Architecture Software Developer s Manual Volume 1: Basic Architecture NOTE: The IA-32 Intel Architecture Software Developer s Manual consists of three volumes: Basic Architecture, Order Number

More information

Introduction to MIPS Assembly Programming

Introduction to MIPS Assembly Programming 1 / 26 Introduction to MIPS Assembly Programming January 23 25, 2013 2 / 26 Outline Overview of assembly programming MARS tutorial MIPS assembly syntax Role of pseudocode Some simple instructions Integer

More information

Embedded x86 Programming: Protected Mode

Embedded x86 Programming: Protected Mode by JEAN GAREAU Embedded x86 Programming: Protected Mode The x86 architecture is ubiquitous on the desktop and is spilling over into embedded systems environments. This article begins a series designed

More information

LSN 2 Computer Processors

LSN 2 Computer Processors LSN 2 Computer Processors Department of Engineering Technology LSN 2 Computer Processors Microprocessors Design Instruction set Processor organization Processor performance Bandwidth Clock speed LSN 2

More information

Instruction Set. Microcontroller Instruction Set. Instructions that Affect Flag Settings (1) The Instruction Set and Addressing Modes

Instruction Set. Microcontroller Instruction Set. Instructions that Affect Flag Settings (1) The Instruction Set and Addressing Modes Microcontroller For interrupt response time information, refer to the hardware description chapter. Instructions that ffect Flag Settings (1) Instruction Flag Instruction Flag C OV C C OV C DD X X X CLR

More information

The AVR Microcontroller and C Compiler Co-Design Dr. Gaute Myklebust ATMEL Corporation ATMEL Development Center, Trondheim, Norway

The AVR Microcontroller and C Compiler Co-Design Dr. Gaute Myklebust ATMEL Corporation ATMEL Development Center, Trondheim, Norway The AVR Microcontroller and C Compiler Co-Design Dr. Gaute Myklebust ATMEL Corporation ATMEL Development Center, Trondheim, Norway Abstract High Level Languages (HLLs) are rapidly becoming the standard

More information

1. General function and functionality of the malware

1. General function and functionality of the malware 1. General function and functionality of the malware The malware executes in a command shell, it begins by checking to see if the executing file contains the MZP file extension, and then continues to access

More information

EE 261 Introduction to Logic Circuits. Module #2 Number Systems

EE 261 Introduction to Logic Circuits. Module #2 Number Systems EE 261 Introduction to Logic Circuits Module #2 Number Systems Topics A. Number System Formation B. Base Conversions C. Binary Arithmetic D. Signed Numbers E. Signed Arithmetic F. Binary Codes Textbook

More information

Buffer Overflows. Security 2011

Buffer Overflows. Security 2011 Buffer Overflows Security 2011 Memory Organiza;on Topics Kernel organizes memory in pages Typically 4k bytes Processes operate in a Virtual Memory Space Mapped to real 4k pages Could live in RAM or be

More information

Introduction. Application Security. Reasons For Reverse Engineering. This lecture. Java Byte Code

Introduction. Application Security. Reasons For Reverse Engineering. This lecture. Java Byte Code Introduction Application Security Tom Chothia Computer Security, Lecture 16 Compiled code is really just data which can be edit and inspected. By examining low level code protections can be removed and

More information

Instruction Set Architecture

Instruction Set Architecture Instruction Set Architecture Consider x := y+z. (x, y, z are memory variables) 1-address instructions 2-address instructions LOAD y (r :=y) ADD y,z (y := y+z) ADD z (r:=r+z) MOVE x,y (x := y) STORE x (x:=r)

More information

MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS

MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS 1) Which is the microprocessor comprises: a. Register section b. One or more ALU c. Control unit 2) What is the store by register? a. data b. operands

More information

Instruction Set Design

Instruction Set Design Instruction Set Design Instruction Set Architecture: to what purpose? ISA provides the level of abstraction between the software and the hardware One of the most important abstraction in CS It s narrow,

More information

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8 ECE Department Summer LECTURE #5: Number Systems EEL : Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz Decimal Number System: -Our standard number system is base, also

More information

612 CHAPTER 11 PROCESSOR FAMILIES (Corrisponde al cap. 12 - Famiglie di processori) PROBLEMS

612 CHAPTER 11 PROCESSOR FAMILIES (Corrisponde al cap. 12 - Famiglie di processori) PROBLEMS 612 CHAPTER 11 PROCESSOR FAMILIES (Corrisponde al cap. 12 - Famiglie di processori) PROBLEMS 11.1 How is conditional execution of ARM instructions (see Part I of Chapter 3) related to predicated execution

More information

CHAPTER 4 MARIE: An Introduction to a Simple Computer

CHAPTER 4 MARIE: An Introduction to a Simple Computer CHAPTER 4 MARIE: An Introduction to a Simple Computer 4.1 Introduction 195 4.2 CPU Basics and Organization 195 4.2.1 The Registers 196 4.2.2 The ALU 197 4.2.3 The Control Unit 197 4.3 The Bus 197 4.4 Clocks

More information

Central Processing Unit Simulation Version v2.5 (July 2005) Charles André University Nice-Sophia Antipolis

Central Processing Unit Simulation Version v2.5 (July 2005) Charles André University Nice-Sophia Antipolis Central Processing Unit Simulation Version v2.5 (July 2005) Charles André University Nice-Sophia Antipolis 1 1 Table of Contents 1 Table of Contents... 3 2 Overview... 5 3 Installation... 7 4 The CPU

More information

Stack Overflows. Mitchell Adair

Stack Overflows. Mitchell Adair Stack Overflows Mitchell Adair Outline Why? What? There once was a VM Virtual Memory Registers Stack stack1, stack2, stack3 Resources Why? Real problem Real money Real recognition Still prevalent Very

More information

Outline. Lecture 3. Basics. Logical vs. physical memory. 8086 physical memory. x86 byte ordering

Outline. Lecture 3. Basics. Logical vs. physical memory. 8086 physical memory. x86 byte ordering Outline Lecture 3 bout Memory ddressing memory Data types MOV instruction ddressing modes Instruction format Dr. Dimitrios S. Nikolopoulos SL/UIU Basics Logical vs. physical memory Memory in the x processors

More information