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
Rounding off of values can be carried out using the write statement. Yes, Rounding off value can be out by using the write statement.

Write a procedure which divides a 32-bit number by a 16-bit number. The procedure must be general which is it's defined in one module and can be called from another assembly module

Task Gantt   Task Gantt shows different tasks being performed it implies that numerous kind of activities by set of processors connected to parallel computer as displayed in Fi

Explain the meaning of BIND socket primitive The bind Primitiv: While created, a socket has neither a remote address nor a local address. A server utilizes the bind proce

In order to get the information kept in a Binary Search Tree in the descending order, one should traverse it in which of the following order?    Right, Root, Left

Describe in brief the history of E-Commerce.  History of E-commerce. E-commerce started before personal computers were prevalent and has grown into a multi-billion d

What is structural hazard? Structural hazard is the situation when two instructions needs the use of a given hardware resource at the similar time. The most common case in whic

Q. What is Shared Memory Programming? We know all processors share a common memory in shared memory model. Every processor can be assigned a separate portion of program stored

Define briefly about Extranet. Extranet: Extranet is Extension of an Intranet which makes the latter available to outside companies or individuals along with or without

Q. Limitations of execution of instructions? 1. Size of memory shown in 16 words while instruction is capable of addressing 210 =1 K words of Memory. However why 210 since 10 b