Trace the pseudo-code, Computer Engineering

Assignment Help:

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.


Related Discussions:- Trace the pseudo-code

What is a spanning tree, What is a spanning Tree? A spanning tree is a ...

What is a spanning Tree? A spanning tree is a tree associated with a network. All the nodes of the graph appear on the tree once. A minimum spanning tree is a spanning tree

Explain what is defecttracker, DefectTracker from Pragmatic Software - D...

DefectTracker from Pragmatic Software - Defect Tracker is a fully web-based defect tracking and hold up ticket system that manages issues and bugs, customer needs, test cases, a

Is it possible to decrease clock skew to zero, Is it possible to decrease c...

Is it possible to decrease clock skew to zero? Describe your answer? Even if there are clock layout strategies (H-tree) which can into theory reduce clock skew to zero by havi

What are the categories of radio communication, What are the categories of ...

What are the categories of Radio communication 1.  Sky wave or ionosphere communication 2.  Line-of-sight (LOS) microwave communication limited by horizon 3.  Troposphere

How much volts a CMOS logic device has approximately, The logic 0 level of ...

The logic 0 level of a CMOS logic device is approximately ? Ans. The low level is 0 volts approx in CMOS logic device.

Explain macro definition, Explain macro definition. A unit of specifica...

Explain macro definition. A unit of specification for a program generation is termed as a macro. This consists of name, body of code and set of formal parameters.

What is net-fu and where is it?, Net-fu is a web-based interface to a scri...

Net-fu is a web-based interface to a script-fu server. The work is completed at a remote site. To see Net-fu, point your web browser or one of the mirror sites, and then go to "gim

Define hyperlinks, Q. Define Hyperlinks? Hyperlinks, or links are one o...

Q. Define Hyperlinks? Hyperlinks, or links are one of the most significant characteristics of web pages. A link moves us from current page to a destination which is specified i

Multithreaded architecture, Q. Multithreaded Architecture? It is clear ...

Q. Multithreaded Architecture? It is clear at the moment if we provide a lot of contexts to multiple threads then processors with numerous contexts are known as multithreaded s

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd