eee212_midterm1_2011_Summer_key - 24/06/2011 BILKENT...

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

View Full Document Right Arrow Icon
24/06/2011 BILKENT UNIVERSITY EEE212 Microprocessors Sections 1&2 Midterm 1 Open TextBook Closed Everything Else including Lecture Notes , No Calculators USE THE BOXES ONLY FOR YOUR ANSWERS! Use comments for readability in your code ! Otherwise, the programs will be partially graded! Duration: 120 minutes Surname:________Key________________ Name:__________Key_____________ Section:________ ID-Number:_______________________ Signature:________________________
Background image of page 1

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

View Full DocumentRight Arrow Icon
Q1) a) (10 pts) Please check the following 8051/8052 instructions, explain its function if it is correct and correct if anything is wrong. Instruction True/False Explanation MOV R3, R5 False Mov 3, 5 MOV 4, 6 True R4 <== R6 MOV A, #-1H True A <== FFH PUSH #40H False Mov a, #40H PUSH ACC MOV A, -0FFH True Equal to mov A, 1 MOV C, 0Bh True Carry <== (0Bh) , bit operation MOV C, B False Can not load “B” register into “Carry” bit MOV 0B, 20H True On-chip memory operation CLR A True A <== 0; clear “A” register CLR 0AH True 0Ah <==0; clear “0AH” bit-addressable memory b) (10 pts) i) What is the decimal equivalent of the 16 bit signed number E216h? E216=1110001000010110 0001110111101001 +1 ----------------------------------------- = 1DEA = 1*16^3+13*16^2+14*16^1+10 =7658 So, signed number = -7658 ii) What is -236.75 in 16 bit signed arithmetic? Solution-1: -236.75 = -237+0.25 16-bit format: 237 = 00ED 2s complement = FF13 So, the result = FF13.4H Solution-2: 236.75 = 00EC.CH = 0000 0000 1110 1100. 1100 B 2s complement = 1111 1111 0001 0011. 0011 +1 ____________________________ 1111
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/23/2011 for the course ENGINEERIN 102 taught by Professor Pablo during the Spring '11 term at Bilkent University.

Page1 / 7

eee212_midterm1_2011_Summer_key - 24/06/2011 BILKENT...

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

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