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
How many flip flops are required to construct a decade counter ? Ans. 4 FlipFlop's are required because decade counter counts 10 states from 0 to 9 (that is from 0000 to 1001).

What is sector sparing? Low-level formatting also sets aside spare sectors not visible to the operating system. The controller can be told to change each bad sector logically w

A two stage non-blocking network requires twice the number of switching elements as the single stage non-blocking network. It is true or false. Ans: It is true that a two st

What are the properties which a data item should possess to implement a critical section? The Critical Section Problem Solution should satisfy the following conditions: 1.

Define entry section and exit section. The critical section problem is to design a protocol that the processes can use to cooperate. Every process must request permission to e

Classification of Systems Systems may be categorized as follows: a)  Formal or Informal b)  Abstract or Physical c)  Closed or Open d)  Automated orManual.

What is the point of the REPLACING option of a copy statement? Ans) REPLACING permits for the similar copy to be used more than once in the similar code by changing the replac

Unlike Ipv4, Ipv6 does not include which field in the base header? Unlike Ipv4, Ipv6 does not contain the Field for Fragmentation information into the base header.

Identify the different classes of grammar. Explain their characteristics and limitations. As proposed through Noam Chomsky that Chomsky hierarchy contains the subsequent level

How to draw the pipe and filter using data flow and it components and connectors