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
Explain Open source software? Open Source Software is software for which the underlying programming code is available to the users so that they might be read it, make changes t

How blocking and non blocking statements get executed? Execution of blocking assignments can be viewed just like a one-step process: 1. Evaluate RHS (right-hand side equatio

How many two-input AND and OR gates are required to realize Y=CD+EF+G ? Ans. Y=CD+EF+G No. of two i/p AND gates=2 No. of two i/p OR gates = 2 One OR gate to OR CD and EF

What is chattering as applied to mechanical switches used in digital systems and why do they occur?  What is its effect on the functioning of a sequential circuit? Ans Chat

SEARCH is a sequential search from the starting of the table. SEARCH ALL is a binary search, continually dividing the table in two halves until a match is found. SEARCH ALL is more

Explain the types of computer architecture Computer architecture can be divided into three main categories: Instruction Set Architecture, or ISA, is the image of a computing

Add +25 to -15 by using 2's complement ? Ans. Firstly convert the numbers 25 and 15 in its 8-bit binary equivalent and determine the 2's complement of 15, after that add +25 to -

Q. What is Gustafsons Law? Amdahl's law is appropriate for applications where response time is significant. On the other hand there are numerous applications that necessitate

What is a semaphore? Semaphore: It is a protected variable or abstract data type that constitutes the typical method for restricting access to shared resources as shared memo

Hyper-threading officially known as Hyper-threading Technology (HTT) is Intel's trademark for their functioning of simultaneous multithreading technology on Pentium 4 micro-archite