HW2_Solutions

HW2_Solutions - Electrical, Computer, &...

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

View Full Document Right Arrow Icon
Electrical, Computer, & Telecommunications Engineering Technology Micro Computers Spring 20073 0618-303 Homework #2 HOMEWORK #2 Due 3/28/08 1. Using the Atmega128 Instruction Manual, look up the following instructions and answer the questions below: a. AND & ANDI i. 1. What is the difference between the AND & the ANDI instructions? AND does a logical and of two registers. ANDi does a logical and of a register and an immediate value ii. Do both instructions affect the status register in the same way? Yes iii. What bits are affected by these instructions? Z, N, V, S iv. Which registers can be used in these instructions? AND can use any of the 32 registers. ANDi can only use registers 16-31 b. ADD & ADC: i. What is the difference between the ADD & the ADC instructions? ADD adds two registers without a carry. ADC adds two registers with a carry ii. Do both instructions affect the status register in the same way? Yes
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 / 2

HW2_Solutions - Electrical, Computer, &...

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