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
Conversion of the decimal number 82.67 into Hexadecimal ? Ans. (1010010.10101011) 2 is the binary equivalent of decimal number 82.67. Now convert each 4-bit binary into an equ

And-Introduction: In generally English says that "if we know that a lot of things are true, so we know that the conjunction of all of them is true", then we can introduce conj

Explain the Design Procedure for Flip Flop? The design procedure as follows. 1) Acquire the clear description of the desired flip flop X. 2) Acquire the present state- next

State the Encryption and decryption process with example Encryption and decryption process in the Figure where Ram wants to send a confidential message to his friend Shyam. Ram

What are the different between hypertext hypermedia? Hypertext is fundamentally the same like regular text; this can be stored, read or searched and edited along with a signifi

Give some examples of malicious data. In May 2002 year, the Norton Anti-Virus software for Windows operating systems detected around 61000 malicious programs. Several of them a

Q. Explain working of Direct Memory Access? In both programmed I/O and interrupt-driven processor is busy with executing input/output instructions and I/O transfer rate is limi

What is 'inode'? All UNIX files have its description kept in a structure called 'inode'. The inode have info about the file-size, its location, time of last access, time of las

A keyword that states the types in a particular namespace can be referred to without requiring their full qualified type names. 'using' reserved word always come with namespace

Unification - Artificial intelligence: We have said that the laws of inference for propositional logic detailed in the previous lecture can also be used in first-order logic.