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
What is delegation? Delegation gives a proper mechanism to achieve the desired code reuse. The method is caught in the desired class and forwarded to another class for actual i


write a program that counts the number of occurrences of the string in the n-th Padovan string P(n)

justify whether the control signal passes through same bus as data ,address and instruction or not?

COMMUNICATIONS TECHNOLOGY: The development of communications technology is, in a sense, a symbol of man's effort to communicate rapidly over great distances. Communications te

how can we find compound interest through flowchart

'On many systems, you can describe a function matherr which will be known as when there are certain floating-point errors, like errors in the math routines in .

Instruction Cycle The instruction cycle consists of a series of steps required for the execution of an Instruction in a program. A distinctive instruction in a program is compo

How Race Around Condition can be avoided? Ans: The race around condition can be avoided if 1. Duration of clock pulse being high is small like comparative to the dela

calculate the time complexity of a=(b/c) operation in stack