Monday, October 4 Assignment(s) due: Assignment #5: COMPLEMENT ARITHMETIC Assignment #6: DEBUG EXERCISES Quiz(zes) due:Quiz #5: Base Arithmetic Quiz #6.

Slides:



Advertisements
Similar presentations
Registers of the 8086/ /2002 JNM.
Advertisements

MICROPROCESSORS TWO TYPES OF MODELS ARE USED :  PROGRAMMER’S MODEL :- THIS MODEL SHOWS FEATURES, SUCH AS INTERNAL REGISTERS, ADDRESS,DATA & CONTROL BUSES.
Introduction to 8086 Microprocessor
SOFTWARE ARCHITECTURE OF THE 8088 AND 8086 MICROPROCESSORS
Introduction to Microprocessor
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#3) By Dr. Syed Noman.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 2 The Microprocessor and its Architecture.
1 ICS 51 Introductory Computer Organization Fall 2006 updated: Oct. 2, 2006.
Assembly Language for Intel-Based Computers Chapter 2: IA-32 Processor Architecture Kip Irvine.
Microprocessors Introduction to ia32 Architecture Jan 31st, 2002.
1 Homework Reading –Professional Assembly Language, pp 17-32, Continue work on mp1 –Questions? Lab with your assigned section this week.
ICS312 Set 3 Pentium Registers. Intel 8086 Family of Microprocessors All of the Intel chips from the 8086 to the latest pentium, have similar architectures.
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 2: 80386DX Internal Architecture & Data Organization.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 2 The Microprocessor and its Architecture.
Gursharan Singh Tatla Block Diagram of Intel 8086 Gursharan Singh Tatla 19-Apr-17.
Unit-1 PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE Advance Processor.
The 8086 Microprocessor The 8086, announced in 1978, was the first 16-bit microprocessor introduced by Intel Corporation 8086 is 16-bit MPU. Externally.
Binary Number Systems.
An Introduction to 8086 Microprocessor.
Computer Arithmetic Nizamettin AYDIN
Computer Arithmetic. Instruction Formats Layout of bits in an instruction Includes opcode Includes (implicit or explicit) operand(s) Usually more than.
1 Fundamental of Computer Suthida Chaichomchuen : SCC
Floating Point. Agenda  History  Basic Terms  General representation of floating point  Constructing a simple floating point representation  Floating.
CH09 Computer Arithmetic  CPU combines of ALU and Control Unit, this chapter discusses ALU The Arithmetic and Logic Unit (ALU) Number Systems Integer.
Types of Registers (8086 Microprocessor Based)
Fall 2012 Chapter 2: x86 Processor Architecture. Irvine, Kip R. Assembly Language for x86 Processors 6/e, Chapter Overview General Concepts IA-32.
INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Faculty of Engineering, Electrical Department,
ECE 456 Computer Architecture
UHD:CS2401: A. Berrached1 The Intel x86 Hardware Organization.
8086 Internal Architecture
(-133)*33+44* *33+44*14 Input device memory calculator Output device controller Control bus data bus memory.
Monday, October 11 Assignment(s) due:Assignment #7: IEEE FLOATING POINT FORMATS EMULATOR PROGRESS WORKSHEET 1 Quiz(zes) due:Quiz #7: Debug Note:Quiz #8:
Chapter 2 Parts of a Computer System. 2.1 PC Hardware: Memory.
Computers organization & Assembly Language Chapter 1 THE 80x86 MICROPROCESSOR.
3.4 Addressing modes Specify the operand to be used. To generate an address, a segment register is used also. Immediate addressing: the operand is a number.
INTRODUCTION TO INTEL X-86 FAMILY
MODULE 5 INTEL TODAY WE ARE GOING TO DISCUSS ABOUT, FEATURES OF 8086 LOGICAL PIN DIAGRAM INTERNAL ARCHITECTURE REGISTERS AND FLAGS OPERATING MODES.
Internal Programming Architecture or Model
Preliminary to Assembly Language Programming CE 140 A1/A2 28 June 2003.
Intel 8086 MICROPROCESSOR ARCHITECTURE
Intel MP Organization. Registers - storage locations found inside the processor for temporary storage of data 1- Data Registers (16-bit) AX, BX, CX, DX.
I NTEL 8086 M icroprocessor بسم الله الرحمن الرحيم 1.
Chapter 12 Processor Structure and Function. Central Processing Unit CPU architecture, Register organization, Instruction formats and addressing modes(Intel.
Chapter Overview General Concepts IA-32 Processor Architecture
Homework Reading Lab with your assigned section starts next week
UNIT Architecture M.Brindha AP/EIE
Introduction to 8086 Microprocessor
8086 Microprocessor.
ADDRESSING MODES.
Intel 8086 MICROPROCESSOR Architecture.
Basic Microprocessor Architecture
Assembly IA-32.
ADDRESSING MODES.
Intel 8088 (8086) Microprocessor Structure
Homework Reading Continue work on mp1
Basic of Computer Organization
Introduction to Assembly Language
BIC 10503: COMPUTER ARCHITECTURE
Intel 8088 (8086) Microprocessor Structure
8086 Registers Module M14.2 Sections 9.2, 10.1.
CS 301 Fall 2002 Computer Organization
COMP 1321 Digital Infrastructure
The Microprocessor & Its Architecture
Computer Architecture CST 250
Unit-I 80386DX Architecture
8086 microprocessior PIN OUT DIAGRAM OF  Power supply and frequency signals  It uses 5V DC supply at V CC pin 40, and uses ground at V SS pin.
Computer Architecture and System Programming Laboratory
Part I Data Representation and 8086 Microprocessors
Presentation transcript:

Monday, October 4 Assignment(s) due: Assignment #5: COMPLEMENT ARITHMETIC Assignment #6: DEBUG EXERCISES Quiz(zes) due:Quiz #5: Base Arithmetic Quiz #6 (Complement Arithmetic) Note: Quiz #7 (Debug) will be due next Monday Emulator Progress Worksheet 1 will be due next Monday Today is the cutoff date for all Simple Computer labs and assignments And next Monday is the cutoff date for all arithmetic assignments and quizzes (Assignment #5, Quiz #5, Quiz #6, Optional Quizzes #5, #7 and #8) Please note:The date of the midterm is Monday, October 18 - an 8.5 in. * 11 in. cheat sheet will be allowed We will review for the midterm next week I recommend going over the midterm practice exercises before I discuss them on Monday Don't forget the optional quiz: Debug

Given the following information in DEBUG: -e u 100, 10A 21F0:0100BB2001MOVBX, F0:0103BE0200MOVSI, 2 21F0: MOVAX, [BX] 21F0: ADDAX, [BX + SI] Trace through the partial program above, showing the contents of the AX, BX and SI registers AXBXSI

Given the following information in DEBUG: -e u 100, 10A 21F0:0100BB2001MOVBX, F0:0103BE0200MOVSI, 2 21F0: MOVAX, [BX] 21F0: ADDAX, [BX + SI] Trace through the partial program above, showing the contents of the AX, BX and SI registers AXBXSI But first: What does this mean?

Given the following information in DEBUG: -e u 100, 10A 21F0:0100BB2001MOVBX, F0:0103BE0200MOVSI, 2 21F0: MOVAX, [BX] 21F0: ADDAX, [BX + SI] Trace through the partial program above, showing the contents of the AX, BX and SI registers AXBXSI But first: What does this mean?

Given the following information in DEBUG: -e u 100, 10A 21F0:0100BB2001MOVBX, F0:0103BE0200MOVSI, 2 21F0: MOVAX, [BX] 21F0: ADDAX, [BX + SI] Trace through the partial program above, showing the contents of the AX, BX and SI registers AXBXSI ?0120 ?

Given the following information in DEBUG: -e u 100, 10A 21F0:0100BB2001MOVBX, F0:0103BE0200MOVSI, 2 21F0: MOVAX, [BX] 21F0: ADDAX, [BX + SI] Trace through the partial program above, showing the contents of the AX, BX and SI registers AXBXSI ?0120 ? ?

Given the following information in DEBUG: -e u 100, 10A 21F0:0100BB2001MOVBX, F0:0103BE0200MOVSI, 2 21F0: MOVAX, [BX] 21F0: ADDAX, [BX + SI] Trace through the partial program above, showing the contents of the AX, BX and SI registers AXBXSI ?0120 ? ?

Given the following information in DEBUG: -e u 100, 10A 21F0:0100BB2001MOVBX, F0:0103BE0200MOVSI, 2 21F0: MOVAX, [BX] 21F0: ADDAX, [BX + SI] Trace through the partial program above, showing the contents of the AX, BX and SI registers AXBXSI ?0120 ? ?

Review: MOVCX,0003 MOV AX, 0000 ADDAX, CX LOOP106 INT20 Using the LOOP instruction (works with CX): How does the loop instruction work?

Review: MOVCX,0003 MOV AX, 0000 ADDAX, CX LOOP106 INT20 Using the LOOP instruction (works with CX): How does the loop instruction work? 1.It decrements CX 2. It checks CX (is CX > 0?) 3.If CX > 0 - it loops to the address specified If CX = 0 - it goes to the next instruction in sequence

- each location in the computer is assigned a unique address - memory locations - input/output devices - the address allows them to be recognized by the CPU - the CPU puts the address on the address bus - identified by the decoding circuits - the data bus is used to get data to or from the address - the control bus sends read/write signals - to indicate if the CPU is asking for or sending information - every process in the computer (at every level of the computer) - uses this fetch/decode/execute cycle

- each location in the computer is assigned a unique address - memory locations - input/output devices - the address allows them to be recognized by the CPU - the CPU puts the address on the address bus - identified by the decoding circuits - the data bus is used to get data to or from the address - the control bus sends read/write signals - to indicate if the CPU is asking for or sending information CPU (ALU, registers, control unit) RAMROMPrintercd/dvdMonitorKeyboardMouse Address Bus Data Bus Control Bus

- the function (or purpose) of the CPU: - to fetch and execute instructions - more efficient if the process is divided - at the same time: - one instruction is being executed, and - the next instruction is being fetched - implemented by theoretically dividing the CPU into: - the execution unit - decodes and executes instructions and - the bus interface unit - fetches the instructions

- the execution unit contains - the ALU - performs operations - arithmetic - logical - registers - high speed memory - temporarily store data or addresses - general purpose registers - available to programmers - special purpose registers - e.g. the instruction pointer, the instruction register - not available to programmers - to indicate if the CPU is asking for or sending information - the flags register - is set (or reset) as the result of operations done in the ALU - can be checked by a program - the decoder - determines the type of instruction - interprets it into a form that can be used in the ALU and registers

- the bus interface unit - where instructions and data come in from main memory - the bus interface unit delivers them to the execution unit - contains: - the instruction queue - allows the bus interface unit to stay ahead of the execution unit - when the queue is full - the buses are idle - if the program performs a jump - the queue will be changed - the instruction pointer - holds the address of the next instruction to be executed - the address will be placed on the address bus - the segment registers - hold the addresses of the various parts of memory used by the program - where the instructions are stored - where the data is stored - where the program’s stack is located - the execution unit and the bus interface unit work in parallel - but the bus interface unit is always at least one step ahead

Registers: General - EAX (accumulator) EAX - 32 bits 8 hexadecimal digits AX - 16 Bits 4 hexadecimal digits AH and AL - 8 bits each 2 hexadecimal digits each - EBX, ECX, EDX - and BX, BH, BL, CX, CH, CL, DX, DH, DL

Intel Registers (grouped by function) Data Registers (general purpose) Index Registers (used in string operations) Pointer Registers (used in stack operations) Accumulator register Base register Count register Data register Source Index register Destination Index register Stack Pointer register Base Pointer register EAX EBX ECX EDX ESI ESP EBP EDI

Segment Registers (16-bit) (hold segment addresses) Control Registers Flags register detail: - bit 0CF - bit 2PF - bit 6ZF - bit 7SF - bit 10DF - bit 11OF Intel Registers (grouped by function) Code Segment register Data Segment register Stack Segment register Extra Segment register EIP EFLAGS Instruction pointer register Flags register CS DS SS ES

- immediate addressing - the operand comes immediately after the instruction e.g. MOV EAX, or MOV AX, ABCD or MOV AH, 2A - direct addressing - specifies the address of the operand e.g. MOV EAX, [0100] or MOV EAX, NUMBER - register addressing - specifies the register in which the operand is stored e.g. MOV EAX, EBX 32-bit Addressing Modes

Scientific Notation Format Normalized Standard Form Scientific Notation Scientific Notation x x , x x x x x x mantissa characteristic fraction exponent (or significand) Scientific notation makes it relatively easy to work with very large or very small numbers - normalized scientific notation used in the computer is called floating point notation

4-Decimal-Digit Floating Point Format Fraction 2 decimal digits Normalized Signed Exponent 2 decimal digits Signed , ( * 10 1 ) (.1 * 10 6 ) (.1 * ) (.1234 * 10 4 )

4-Decimal-Digit Floating Point Format Fraction 2 decimal digits Normalized Signed Exponent 2 decimal digits Signed , Range: - defined by the number of digits in the exponent (-.99 x x ) Precision: - defined by the number of digits in the fraction (2 digits of precision)

- if the 4-decimal digit format is changed: Fraction 3 decimal digits Normalized Signed Exponent 1 decimal digit Signed - the range is smaller (-.999* *10 9 ) - there is a smaller distance between adjacent numbers - there is greater accuracy

- if the 4-decimal digit format is changed: Fraction 1 decimal digit Normalized Signed Exponent 3 decimal digits Signed - the range is increased - accuracy is greatly decreased

- if the 4-decimal digit format is changed: Fraction 1 decimal digit Normalized Signed Exponent 3 decimal digits Signed - the range is increased - accuracy is greatly decreased - no matter what format is used - these numbers will generate 7 different regions of storage: - a positive value region, - a negative value region and a - zero region - 2 overflow regions - 2 underflow regions

Range and regions of value for a 4-decimal-digit floating point format: Fraction 2 decimal digits Normalized Signed Exponent 2 decimal digits Signed

zero.10x x x x x x10 0 Range of 4-decimal-digit floating point format: (using the number line) (Absolutely not to scale) overflow underflow

Roundoff Error If we store aswe truncate (round down) to 3.1 If we store aswe round up to If we store 1234 aswe round down to Fraction 2 decimal digits Normalized Signed Exponent 2 decimal digits Signed

Floating point formats: - often stored in normalized scientific notation form (.xxxxxx * base exponent ) - precision (accuracy) - affected by the number of digits in the fraction - affected by the limits of binary representation - range - determined by the number of digits in the exponent - often generate a round-off error

Binary Floating Point Formats - most are based on dividing the binary number into 3 parts: - the sign (1 bit) - 0 = positive, 1 = negative - the exponent - uses excess-N notation - the fractional part - will be normalized - the radix point - will be to the left or right of the most significant bit - depending on the format used A 32-bit floating point number: or

To calculate the fraction: - we must know the position of the radix point - to the left or right of the most significant bit

To calculate the fraction: - we must know the position of the radix point - to the left or right of the most significant bit(it's to the left)

To calculate the fraction: - we must know the position of the radix point - to the left or right of the most significant bit(it's to the left) - and the base that will be used to calculate the exponent - called the radix of exponentiation - usually base 2, 8 or 16

To calculate the fraction: - we must know the position of the radix point - to the left or right of the most significant bit(it's to the left) - and the base that will be used to calculate the exponent - called the radix of exponentiation - usually base 2, 8 or 16(we'll look at all three)

To calculate the fraction: - we must know the position of the radix point - to the left or right of the most significant bit(it's to the left) - and the base that will be used to calculate the exponent - called the radix of exponentiation - usually base 2, 8 or 16(we'll look at all three) To calculate the exponent: - we must first normalize the fraction to find the exponent - using the radix of exponentiation

To calculate the fraction: - we must know the position of the radix point - to the left or right of the most significant bit(it's to the left) - and the base that will be used to calculate the exponent - called the radix of exponentiation - usually base 2, 8 or 16(we'll look at all three) To calculate the exponent: - we must first normalize the fraction to find the exponent - using the radix of exponentiation - if the exponent is stored in 7 bits(it's stored in 7 bits) - it uses excess-64 notation - if the exponent is stored in 8 bits - it uses excess-127 notation

The problem: - how would be represented in a hypothetical machine - using a 32-bit floating point format - 1 bit for the sign bit - (0 = positive, 1 = negative) - 7 bits for the exponent - using excess-64 notation - 24 bits for the fraction - normalized - radix point to the left of the most significant bit - the radix of exponentiation is 2

Step 1:Convert to radix = =

Step 1:Convert to radix = = Step 2:Normalize the fraction - move the radix point to the left of the most significant bit - i.e. move the radix point to the right 9 bits =

Step 1:Convert to radix = = Step 2:Normalize the fraction - move the radix point to the left of the most significant bit - move the radix point to the right 9 bits = on a computer using radix 2 the normalized form is: = * (2 -9 ) 10

Step 1:Convert to radix = = Step 2:Normalize the fraction - move the radix point to the left of the most significant bit - move the radix point to the right 9 bits = on a computer using radix 2 the normalized form is: = * (2 -9 ) 10 the 24 bits we need for the fraction

- normalizing the fraction gives us the fraction in radix 2 and the exponent in radix 10 = * (2 -9 ) 10 fraction exponent

- normalizing the fraction gives us the fraction in radix 2 and the exponent in radix 10 = * (2 -9 ) 10 fraction exponent Step 3: Convert the exponent to its excess-64 form in radix 2 - in radix 10: = in radix 2:

- normalizing the fraction gives us the fraction in radix 2 and the exponent in radix 10 = * (2 -9 ) 10 fraction exponent Step 3: Convert the exponent to its excess-64 form in radix 2 - in radix 10: = in radix 2: Step 4:Put the number together sign exponent fraction or E in hexadecimal

The problem: - how would be represented in a hypothetical machine - using a 32-bit floating point format - 1 bit for the sign bit - (0 = positive, 1 = negative) - 7 bits for the exponent - using excess-64 notation - 24 bits for the fraction - normalized - radix point to the left of the most significant bit - the radix of exponentiation is 8 - for radix 8 we move the radix point in sets of 3 bits (1 octal digit = 3 binary digits)

Step 1:Convert to radix = Step 2:Normalize the fraction - move the radix point to the left of the most significant bit - move the radix point to the right in sets of 3 bits - and stay to the left of the msb =

Step 1:Convert to radix = Step 2:Normalize the fraction - move the radix point to the left of the most significant bit - move the radix point to the right in sets of 3 bits - and stay to the left of the msb = on a computer using radix 8 the normalized form is: = * (8 -3 ) 10 the 24 bits we need for the fraction Note: the roundoff error is truncation error - if the roundoff error was from rounding bit #31 would be a 1

- normalizing the fraction gives us the fraction in radix 2 and the exponent in radix 10 = * (8 -3 ) 10 fraction exponent Step 3: Convert the exponent to its excess-64 form in radix 2 - in radix 10: = in radix 2:

- normalizing the fraction gives us the fraction in radix 2 and the exponent in radix 10 = * (8 -3 ) 10 fraction exponent Step 3: Convert the exponent to its excess-64 form in radix 2 - in radix 10: = in radix 2: Step 4:Put the number together sign exponent fraction or 3 D E in hexadecimal

The problem: - how would be represented in a hypothetical machine - using a 32-bit floating point format - 1 bit for the sign bit - (0 = positive, 1 = negative) - 7 bits for the exponent - using excess-64 notation - 24 bits for the fraction - normalized - radix point to the left of the most significant bit - the radix of exponentiation is 16 - for radix 16 we move the radix point in sets of 4 bits (1 hexadecimal digit = 4 binary digits) (This was the short-form floating point format used on the IBM 370 computer)

Step 1:Convert to radix = Step 2:Normalize the fraction - move the radix point to the left of the most significant bit - move the radix point to the right in sets of 4 bits - and stay to the left of the msb =

Step 1:Convert to radix = Step 2:Normalize the fraction - move the radix point to the left of the most significant bit - move the radix point to the right in sets of 4 bits - and stay to the left of the msb = on a computer using radix 16 the normalized form is: = * (16 -2 ) 10 the 24 bits we need for the fraction Note: the roundoff error is is the same for rounding or truncation - the next bit is a 0

- normalizing the fraction gives us the fraction in radix 2 and the exponent in radix 10 = * (16 -2 ) 10 fraction exponent Step 3: Convert the exponent to its excess-64 form in radix 2 - in radix 10: = in radix 2:

- normalizing the fraction gives us the fraction in radix 2 and the exponent in radix 10 = * (16 -2 ) 10 fraction exponent Step 3: Convert the exponent to its excess-64 form in radix 2 - in radix 10: = in radix 2: Step 4:Put the number together sign exponent fraction or ? in hexadecimal

Conversion to/from floating point formats: - decimal number to hexadecimal floating point format: - convert decimal number to binary - convert to normalized scientific form (varies) - convert exponent to its excess-N form in binary - add sign bit to exponent and fraction - convert binary number to hexadecimal

To decode the hexadecimal number 3E (same format):

To decode the hexadecimal number 3E (same format): The number in binary:

To decode the hexadecimal number 3E (same format): The number in binary: Sign: positive Exponent: Fraction:.01 2

To decode the hexadecimal number 3E (same format): The number in binary: Sign: positive Exponent: Fraction:.01 2 The normalized form:.01 x (16 -2 ) 10

To decode the hexadecimal number 3E (same format): The number in binary: Sign: positive Exponent: Fraction:.01 2 The normalized form:.01 x (16 -2) 10 The non-scientific binary form:

To decode the hexadecimal number 3E (same format): The number in binary: Sign: positive Exponent: Fraction:.01 2 The normalized form:.01 x (16 -2) 10 The non-scientific binary form: The number in decimal: = 1/1024 or

Conversion to/from floating point formats: - decimal number to hexadecimal floating point format: - convert decimal number to binary - convert to normalized scientific form (varies) - convert exponent to its excess-N form in binary - add sign bit to exponent and fraction - convert binary number to hexadecimal - hexadecimal floating point format to decimal value - convert hexadecimal number to binary - determine sign, exponent and fraction - convert exponent to its decimal form - convert to normalized form - convert to its non-scientific binary form - convert to decimal

The problem from Lab #9: - how would be represented in a hypothetical machine - using a 32-bit floating point format - 1 bit for the sign bit - (0 = positive, 1 = negative) - 7 bits for the exponent - using excess-64 notation - 24 bits for the fraction - normalized - radix point to the left of the most significant bit - the radix of exponentiation is 16 - for radix 16 we move the radix point in sets of 4 bits (1 hexadecimal digit = 4 binary digits) (This was the short-form floating point format used on the IBM 370 computer)

The problem from Lab #9: - how would be represented in a hypothetical machine - using a 32-bit floating point format - 1 bit for the sign bit - (0 = positive, 1 = negative) - 7 bits for the exponent - using excess-64 notation - 24 bits for the fraction - normalized - radix point to the left of the most significant bit - the radix of exponentiation is 16 - for radix 16 we move the radix point in sets of 4 bits (1 hexadecimal digit = 4 binary digits) (This was the short-form floating point format used on the IBM 370 computer).74 * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = 1.12

Step 1:Convert to radix = Step 2:Normalize the fraction - move the radix point to the left of the most significant bit - move the radix point to the left in sets of 4 bits - and stay to the left of the msb = on a computer using radix 16 the normalized form is: = * (16 2 ) 10 the 24 bits we need for the fraction Step 3:- the roundoff error is is from rounding - the next bit is a 1 - the normalized form becomes = * (16 2 ) 10

Step 1:Convert to radix = Step 2:Normalize the fraction - move the radix point to the left of the most significant bit - move the radix point to the left in sets of 4 bits - and stay to the left of the msb = on a computer using radix 16 the normalized form is: = * (16 2 ) 10 the 24 bits we need for the fraction Step 3:- the roundoff error is is from rounding - the next bit is a 1 - the normalized form becomes = * (16 2 ) 10

Step 1:Convert to radix = Step 2:Normalize the fraction - move the radix point to the left of the most significant bit - move the radix point to the left in sets of 4 bits - and stay to the left of the msb = on a computer using radix 16 the normalized form is: = * (16 2 ) 10 the 24 bits we need for the fraction Step 3:- the roundoff error is is from rounding - the next bit is a 1 - the normalized form becomes = * (16 2 ) 10

- normalizing the fraction gives us the fraction in radix 2 and the exponent in radix 10 = * (16 2 ) 10 fraction exponent Step 3: Convert the exponent to its excess-64 form in radix 2 - in radix 10: = in radix 2: Step 4:Put the number together sign exponent fraction or C 2 2 E B D 7 1 in hexadecimal

- normalizing the fraction gives us the fraction in radix 2 and the exponent in radix 10 = * (16 2 ) 10 fraction exponent Step 3: Convert the exponent to its excess-64 form in radix 2 - in radix 10: = in radix 2: Step 4:Put the number together sign exponent fraction or C 2 2 E B D 7 1 in hexadecimal

- normalizing the fraction gives us the fraction in radix 2 and the exponent in radix 10 = * (16 2 ) 10 fraction exponent Step 3: Convert the exponent to its excess-64 form in radix 2 - in radix 10: = in radix 2: Step 4:Put the number together sign exponent fraction or C 2 2 E B D 7 1 in hexadecimal

IEEE Standard Floating Point Formats for the Intel 8087 microprocessor: - the Short Real form:(uses excess-127 for the exponent)

IEEE Standard Floating Point Formats for the Intel 8087 microprocessor: - the Short Real form:(uses excess-127 for the exponent) - the Long Real form:(uses excess-1023 for the exponent)

The IEEE Short Real form:(and the Long Real form) - divides the binary number into 3 parts: - the sign (1 bit) - 0 = positive, 1 = negative

The IEEE Short Real form:(and the Long Real form) - divides the binary number into 3 parts: - the sign (1 bit) - 0 = positive, 1 = negative - the exponent -uses excess-N notation - excess-127 for Short Real - excess-1023 for Long Real -the radix of exponentiation is 2

The IEEE Short Real form:(and the Long Real form) - divides the binary number into 3 parts: - the sign (1 bit) - 0 = positive, 1 = negative - the exponent -uses excess-N notation - excess-127 for Short Real - excess-1023 for Long Real -the radix of exponentiation is 2 - the fractional part - normalized using the scientific notation method - with the radix point to the right of the most significant bit (always a 1) - then the msb is implied in the number and not stored - it's considered "hidden" in the floating point format

More IEEE Standard Floating Point Formats for the Intel 8087 microprocessor - the Temporary Real form:(uses excess for the exponent) - the temporary real form: - uses normalized notation - msb to the right of the binary point and NOT hidden - there are also 4 additional formats to handle overflow and underflow

The problem: - how would be represented in a hypothetical machine - using a 32-bit floating point format (IEEE standard) - 1 bit for the sign bit - (0 = positive, 1 = negative) - 8 bits for the exponent - using excess-127 notation - 23 bits for the fraction - normalized - radix point to the right of the most significant bit - msb is "hidden" - the radix of exponentiation is 2

Step 1:Convert to radix = = Step 2:Normalize the fraction - move the radix point to the right of the most significant bit - move the radix point to the right 10 bits =

Step 1:Convert to radix = = Step 2:Normalize the fraction - move the radix point to the right of the most significant bit - move the radix point to the right 10 bits = on a computer using radix 2 the normalized form is: = * (2 -10 ) 10 the 23 bits we need for the fraction

- normalizing the fraction gives us the fraction in radix 2 and the exponent in radix 10 = * (2 -10 ) 10 fraction exponent Step 3: Convert the exponent to its excess-127 form in radix 2 - in radix 10: = in radix 2:

- normalizing the fraction gives us the fraction in radix 2 and the exponent in radix 10 = * (2 -10 ) 10 fraction exponent Step 3: Convert the exponent to its excess-127 form in radix 2 - in radix 10: = in radix 2: Step 4:Put the number together sign exponent fraction or 3 A E in hexadecimal

To decode the hexadecimal number 3D (IEEE format):

To decode the hexadecimal number 3D (IEEE format): The number in binary:

To decode the hexadecimal number 3D (IEEE format): The number in binary: Sign: positive Exponent: -3 Fraction: 1.1

To decode the hexadecimal number 3D (IEEE format): The number in binary: Sign: positive Exponent: -3 Fraction: 1.1 The normalized form:1.1 x (2 -3 ) 10

To decode the hexadecimal number 3D (IEEE format): The number in binary: Sign: positive Exponent: -3 Fraction: 1.1 The normalized form:1.1 x (2 -3 ) 10 The binary number:

To decode the hexadecimal number 3D (IEEE format): The number in binary: Sign: positive Exponent: -3 Fraction: 1.1 The normalized form:1.1 x (2 -3 ) 10 The binary number: The decimal number:1/8 +1/16 or 3/16 or

Conversion to/from floating point formats: - decimal number to hexadecimal floating point format: - convert decimal number to binary - convert to normalized scientific form (varies) - convert exponent to its excess-N form in binary - add sign bit to exponent and fraction - convert binary number to hexadecimal - hexadecimal floating point format to decimal value - convert hexadecimal number to binary - determine sign, exponent and fraction - convert exponent to its decimal form - convert to normalized form - convert to its non-scientific binary form - convert to decimal

Monday, October 4 Assignment(s) due: Assignment #5: COMPLEMENT ARITHMETIC Assignment #6: DEBUG EXERCISES Quiz(zes) due:Quiz #5: Base Arithmetic Quiz #6 (Complement Arithmetic) Note: Quiz #7 (Debug) will be due next Monday Emulator Progress Worksheet 1 will be due next Monday Today is the cutoff date for all Simple Computer labs and assignments And next Monday is the cutoff date for all arithmetic assignments and quizzes (Assignment #5, Quiz #5, Quiz #6, Optional Quizzes #5, #7 and #8) Please note:The date of the midterm is Monday, October 18 - an 8.5 in. * 11 in. cheat sheet will be allowed We will review for the midterm next week I recommend going over the midterm practice exercises before I discuss them on Monday Don't forget the optional quiz: Debug

The problem from Lab #9 (Part 2): - how would be represented in a hypothetical machine - using a 32-bit floating point format - 1 bit for the sign bit - (0 = positive, 1 = negative) - 8 bits for the exponent - using excess-127 notation - 24 bits for the fraction - normalized - radix point to the right of the most significant bit - and the most significant bit is "hidden" - the radix of exponentiation is 2 - for radix 2 we move the radix point bit by single bit (This is the IEEE standard short-form floating point format).74 * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = * 2 = 1.12

Step 1:Convert to radix = Step 2:Normalize the fraction - move the radix point to the right of the most significant bit - move the radix point to the left bit by bit = on a computer using radix 16 the normalized form is: = * (2 5 ) 10 the 23 bits we need for the fraction Step 3:- the roundoff error is is from rounding - the next bit is a 1 - the normalized form becomes = * (2 5 ) 10

Step 1:Convert to radix = Step 2:Normalize the fraction - move the radix point to the right of the most significant bit - move the radix point to the left bit by bit = on a computer using radix 16 the normalized form is: = * (2 5 ) 10 the 23 bits we need for the fraction Step 3:- the roundoff error is is from rounding - the next bit is a 1 - the normalized form becomes = * (2 5 ) 10

Step 1:Convert to radix = Step 2:Normalize the fraction - move the radix point to the right of the most significant bit - move the radix point to the left bit by bit = on a computer using radix 16 the normalized form is: = * (2 5 ) 10 the 23 bits we need for the fraction Step 3:- the roundoff error is is from rounding - the next bit is a 1 - the normalized form becomes = * (2 5 ) 10

- normalizing the fraction gives us the fraction in radix 2 and the exponent in radix 10 = * (2 5 ) 10 fraction exponent Step 3: Convert the exponent to its excess-127 form in radix 2 - in radix 10: = in radix 2: Step 4:Put the number together sign exponent fraction or C 2 3 A F 5 C 3 in hexadecimal

Step 4:Put the number together sign exponent fraction or C 2 3 A F 5 C 3 in hexadecimal - normalizing the fraction gives us the fraction in radix 2 and the exponent in radix 10 = * (2 5 ) 10 fraction exponent Step 3: Convert the exponent to its excess-127 form in radix 2 - in radix 10: = in radix 2:

- normalizing the fraction gives us the fraction in radix 2 and the exponent in radix 10 = * (2 5 ) 10 fraction exponent Step 3: Convert the exponent to its excess-64 form in radix 2 - in radix 10: = in radix 2: Step 4:Put the number together sign exponent fraction or C 2 3 A F 5 C 3 in hexadecimal