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 are limitations of assembly language, What are limitations of assembly...

What are limitations of assembly language? i. It is changed to machine language using assembler which is time consuming when compared with machine language. ii. It is comple

arithmetic pipelines, Arithmetic Pipelines The method of pipelining ca...

Arithmetic Pipelines The method of pipelining can be applied to a variety of complex and slow arithmetic operations to speed up the processing time. The pipelines used for arit

Build data flow diagrams showing functional dependencies, Build data Flow d...

Build data Flow diagrams showing functional dependencies Data flow diagrams are very useful for showing functional dependencies. In data flow diagrams processes are indicated

Single bus structures, Single BUS STRUCTURES : The Bus structure and ...

Single BUS STRUCTURES : The Bus structure and multiple bus structures are kinds of bus or computing. A bus is fundamentally a subsystem which transfers data amongst the compo

Describe about managing data tasks?, Data can be handled by using the featu...

Data can be handled by using the features of Import text wizard and export text wizard. Here you can keep the operation for future use. First you should edit the specification name

Benefits of device controllers, Q. Benefits of Device controllers? Usin...

Q. Benefits of Device controllers? Using device controllers for attaching I/O devices to a computer system in place of connecting them directly to system bus has subsequent ben

Declarative programming languages, Declarative programming languages: ...

Declarative programming languages: We notice that declarative programming languages can have some better compensation over procedural ones. Actually, it is often said that a J

Responsibilities of objects, The Transaction object is responsible for read...

The Transaction object is responsible for reading the transaction file, finding the relevant account in the array of customers and applying the transaction. To find the relevant ac

Contact-based keyboards, Contact-based keyboards employ switches directly. ...

Contact-based keyboards employ switches directly. Though they have a comparatively shorter life they are the most preferred type these days because of their lower cost.  Three such

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