You are on page 1of 2

ECE 341 Introduction to Microcontrollers

Homework 1
Instructor: Dr. Chandra
Teaching Assistant: Adrian Gonzalez
June 21, 2016

Instructions: Work all the problems by hand and show all your steps. Scan
your work and create a .pdf file and upload it to Blackboard. Name the file as
JohnDoeECE341HW1.pdf where John and Doe is replaced with your first and
last name respectively. Typed homework will not be accepted unless
otherwise noted.
1. Let X and Y be 6-bit twos complement numbers. Consider the sum
Z = 6X + 7Y
(a) What is the maximum value of Z?
(b) What is the minimum value of Z?
(c) Determine the minimum number of bits needed to represent Z.
2. A microcontroller has a code ROM plus 8MB flash memory.
(a) If the last address of the ROM is 0x3ff what is the size of the ROM?
(b) How many bits are needed in order to address a byte in the flash
memory?
3. How many clock cycles are required in order to execute a sequence of 300
instructions on a 5-stage instruction pipeline?
4. Produce assembly language fragment that is equivalent to the C-code
shown bellow
P=255P ; // S u b t r a c t P from 255
P+=2;
//P=P+2;

You might also like