soln.sample.quiz3

soln.sample.quiz3 - valid exponent and a significand field...

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

View Full Document Right Arrow Icon
CMPT 250 : QUIZ 3 Solutions 1. Booth’s method provides the following advantages: a. Performs signed arithmetic directly. b. Performs multiplication more quickly. 2. a. Each distinct binary sequence of 32 bits defines a unique 32 floating point number, therefore there are 2 distinct floating point numbers. However exponents of 0 and 255 do not actually correspond to values but to underflow and overflow situations. In other words when the exponent is 0000 0000 or 1111 1111 then no number is defined for any values assigned to the other 24 bits. The one exception is all 0’s which 32 25 represents 0. So the number of valid values is 2 -2 +1. b. The largest valid value would have all 1’s in the significand 8 field, and an exponent of 2 -2. In binary: 0111 1111 0111 1111 1111 1111 1111 1111 In hex: 7F7F FFFF The smallest value would be negative and have the smallest possible valid exponent and the largest possible significand: 1111 1110 1111 1111 1111 1111 1111 1111 In hex: FEFF FFFF c. The smallest value in magnitude would have the smallest
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: valid exponent and a significand field of all 0s: 0000 0000 1000 0000 0000 0000 0000 0000 In hex: 0080 0000 3. entity FSM is port(req,err,ack: in bit; z1,z0: out bit); end FSM; architecture behav of FSM is begin proc1: process(req,err,ack) type state is range 1 to 3 variable curr_state: state := 0; begin case curr_state is when 1=> if req=1then curr_state:=2 else curr_state:=1; end if; when 2=> if err=1 then curr-state:=3 else curr_state:=1; end if; (C) A.H.Dixon page. .1 when 3=> if ack=1 then curr_state:=1 else curr_state:=3 end if; end case; case curr_state is when 1=> z1<=0; z0<=1; when 2=> z1<=1; z0<=0; when 3=> z1<=1; z0<=1; end case; end process; end behav; 4. 1 1 A3 A2 A1 A0 R(E)<-S, ack W<-W+1 R<-shr R R(E)>1 S<-A(E) R<-A(W)+B(W) B(E)<-B(E)+1 B(W)<-shr B(W) A(E)<- A(E)+1 A(W)<-shr A(W) = > < A(E):B(E) B<- bus2 A,- bus1 st (C) A.H.Dixon page. .2...
View Full Document

This note was uploaded on 01/16/2010 for the course CS 251 taught by Professor Various during the Spring '97 term at Simon Fraser.

Page1 / 2

soln.sample.quiz3 - valid exponent and a significand field...

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