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
Explain the Power Dissipation characteristics for digital IC's. Ans. Power Dissipation: - It is amount of power dissipated in a digital IC. This is determined through

In a particular exchange during busy hour 1200 calls were offered to a group of trunks, during this time 6 calls were lost. The average call duration being 3 minutes Calculate

What is Reflection?  It extends the benefits of metadata by permitting developers to inspect and use it at runtime. For example, dynamically verify all the classes contained in

Level of a node The root is at level zero and the level of the node is 1 more than the level of its parent

• Moral and Ethical Implications o Will this be safe to have on the road    Will the computers on board be able to handle extreme circumstances • Hazardous conditions o Ex

Internal Path length It is described as the number of node traversed while moving by one particular node to any other node in the tree.

What is the  logical difference among Move A TO B and COMPUTE B = A ? Ans) In case of Move A TO B it will move whatever the value of a in to b. It mean it will move nume

Is the ROM a volatile memory? Explain Ans. No, ROM is a Non-Volatile memory. Programming of ROM includes making of the needed  interconnections at  the time of fabrication and


Define formal language grammar? A formal language grammar is a set of formation rules which describe that strings made by the alphabet of a formal language are syntactically va