eee410_lecture8 - EEE 410 Microprocessors I Fall 05/06...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
EEE 410 – Microprocessors I Fall 05/06 – Lecture Notes # 8 Outline of the Lecture Arithmetic and Logic Instructions and Programs Unsigned Addition and Subtraction U NSIGNED A DDITION AND S UBTRACTION ¾ Unsigned numbers are defined as data in which all the bits are used to represent data and no bits are set aside for the positive and negative sign. For 8-bit, data operand can be between 00H and FFH (0 to 255 decimal For 16-bit, data operand can be between 00H and FFFFH ( 0 to 65535 decimal) ¾ ADD: Addition of unsigned numbers Format: ADD destinatin,source ;dest. operand = dest. operand + source operand Ex: Show how the flag register is affected by the following addition MOV AL,0F5H ADD AL,0BH Solution: F5 1111 0101 + 0B + 0000 1011 100H 0000 0000 After the addition AL will contain 00 and the flags are as follows. CF = 1 since there is a carry out from d7 SF = 0 the status of d7 of the result PF = 1 AF = 1 ZF = 1 ¾ ADC: Add with carry Format: ADC destination,source ; dest .operand = dest. operand + source + CF
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

eee410_lecture8 - EEE 410 Microprocessors I Fall 05/06...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online