eec70hw - remr,value,3 if:beqzr,flag1 moveflag,0 bendif...

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

View Full Document Right Arrow Icon
Sheet1 Page 1 HW1 Chp. 1 1.8Since each instruction takes 6 steps and three of those steps take 10 units and 3 take 1 unit then the total number of units o 1.9A compiler changes high-level language to an intermediate-level language. The assembler takes the intermediate-level lan g 1.12 1.14The number of instructions executed per second determines which computer would be better since that determines the sp e Chp. 2 2.4.data a:.word b:.word 13 c:.word d:.word i:.word 2 .text __start: for:bgti,a, endfor mulc,b,i if:beqzc,endif subd,b,a remd,d,c endif:addi,i,1 bfor endfor: done 2.10If counter is set to 1 then the second method would be shorter and if counter is set to >1 then the first method would be s h 2.13.data value:.word flag:.word .text __start:
Background image of page 1

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

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

Unformatted text preview: remr,value,3 if:beqzr,flag1 moveflag,0 bendif flag1:moveflag,0 endif: done Chp. 3 3.5from octal to decimal:7*8^0 + 6*8^1 + 4*8^2 + 0*8^3 = 311 from octal to binary:4=100two,6=110two,7=111two , so 467 = 100110111two 3.8BinaryOctalDecimalHexadecimal 10110054442c 11101100354472ec 1010110111012676952b7 1100110635133 1011010132905a 11111177633f 011000111439963 10101011111152772751abf Sheet1 Page 2 3.12a.64.5,64=1000000,.5*2=1+.0, 64.5=1000000.1two b..025,0=0,.025*2=0+.05, .05*2=.0+.1, .1*2=0+.2, .2*2=0+.4, .4*2=0+.8, .8*2=1+.6, .6*2=1+.2, and so on. .... .025=0.00000110 c.18.0625, 18=10010,.0625*2=0+.1250, .1250*2=0+.25, .25*2=0+.5, .5*2=1+.0,18.0625=10010.0001two Chp.4 4.7...
View Full Document

This note was uploaded on 05/28/2011 for the course EEC 070 taught by Professor Chuah,c during the Winter '08 term at UC Davis.

Page1 / 2

eec70hw - remr,value,3 if:beqzr,flag1 moveflag,0 bendif...

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