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
Q. Illustrate Layout of Magnetic Disk? Head is a relatively small device capable of reading from or writing to a part of platter rotating beneath it. This gives rise to organiz

to find the area under curve

Explain Clone process. A clone process is generated using primitive type clone by duplicating its parent process. However unlike traditional processes it might be share its con

Q. Illustrate Organisation of DRAM Chip? The given figure is a typical organisation of 16 mega bit DRAM. It displays a typical organisation of 2048 × 2048 × 4 bit DRAM chip. Me

What is the maximum size of a database that can be opened in Microsoft Access? Ans) 1 Gigabyte

Explain File scope File scope: The variables and functions with file scope appear outside any block or list of parameters and are accessible from any place in the translation

How are the function code handles in Flow Logic? When the User selects a function in a transaction, the system copies the function code into a           specially   designated

Explain the meaning of LISTEN socket primitive The listen Primitive: After identifying a protocol port a server should instruct the operating system to place a socket

Q. What is Small Computer Systems Interface? The other well-liked way is to connect a disk drive to a PC by a SCSI interface. Common drive choice for high-end workstations or s

We have to use 3 MPI communications: Plz the code in C++     1.  MPI_Scatter 2.  MPI_Alltoall 3.  MPI_Gather     **The length of the array will be determined by the user Fir