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
PRAM is one among the models which are used for designing the parallel algorithm as shown in Figure. The PRAM model comprises the following components: i)  A group of identical

Q. Show the Mailing lists on Internet? Another exciting aspect about E-mail is that you can find groups of people who share your interests-whether you are inclined toward games

When Workday opened in 2005, the company had no idea it would be regarded as the most successful IPO of 2012. The introduction of cloud computing into the HR and financial systems

Q. What do you mean by Execution Unit? Execution unit performs all ALU operations. Execution unit of 8086 is of 16 bits. It also contains the control unit that instructs bus in

Explain briefly Common sub expression elimination of the commonly used code optimization techniques. Common sub expression elimination: In given expression as "(a+b)-(

Explain the E-cheques verses Credit Cards in brief. E-cheques: E-cheques are utilized for business dealing into e-commerce. Transactions of such cheques take place onto Inter

In the Byteland country a string "s" is said to super ascii string if and only if count of each charecter in the string is equal to its ascci value in the byteland country ascii co

Translate the following sentences into predicate logic, using identity (=). a. Everyone was drunk except John. b. Christine rides a bike, but everyone else drives a car. c

c program for converting context free grammar to griebach normal form

Which datatype cannot be used to define parameters. Type F datatype is not used to explain parameters.