Trace the pseudo-code, Computer Engineering

Consider the following pseudo-code segment.

1.  input y {y is a three-digit hexadecimal number}

2.  d ← 0

3. for i = 1 to 3
     3.1. char ← ith character from y reading from right to left

     3.2. if char = 'A or B or C or D or E or F'

       3.2.1. Convert char to its decimal equivalent

3.3. end if

3.4. d <- d + 16i-1
4. end for

5. output d
 
(a) Trace the pseudo-code for the input y = A2E

(b) Briefly explain in words what this pseudo-code does, including its purpose. You only need to write two or three short sentences to answer this question.

Posted Date: 3/1/2013 1:09:43 AM | Location : United States







Related Discussions:- Trace the pseudo-code, Assignment Help, Ask Question on Trace the pseudo-code, Get Answer, Expert's Help, Trace the pseudo-code Discussions

Write discussion on Trace the pseudo-code
Your posts are moderated
Related Questions
aggregation in dbms?

What Is The Difference Between ViewState and SessionState? View State persist the values of controls of certain page in the client (browser) when post back operation done. When

Q. What is a breeder reactor? 92 U 238 and 90 Th 232 aren't fissile materials but are abundant in nature. In the reactor these are able to be converted into a fissile mater

Subtraction 11001-10110 using 1's complement Ans. 11001 - 10110 01001 is 1' s Compliment of 10110, so     1 1 0 0 1 +  0 1 0 0 1 ------------------    1 0 0 0 1 0    Add 1

The logic 0 level of a CMOS logic device is approximately ? Ans. The low level is 0 volts approx in CMOS logic device.

Use 4 D-bascules connected in serial all synchronized with the similar CLK. Then connect all 4 outputs, & 2nd output must reverse, of the D-bascule to an AND logic. The output of t

write a program to find the area under the curve y=f(x) between x=a and x=b,integrate y=f(x) between the limits of a and b

What are the three main components of LINQ or Language Integrated Query? Ans) 1. Standard Query Operators 2. Language Extensions 3. LINQ Providers

Q. Convert the following into POS form 1.  (AB + C + DC)(AB + BC + D) 2.  WYZ + XYZ + W'X'Y + W'XYZ 3.  XY + XZ + X'YZ' 4.   (A+B'+C) (AB+AC') 5.   F(A,B,C,D)=M(0,3,

Describe CMOS inverter. Ans: CMOS inverter that is also called Complementary MOSFET Inverters, are several of the most broadly used and adaptable MOSFET inverters utilized i