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

Explain the uses of keyboards, Explain the uses of Keyboards An alphanu...

Explain the uses of Keyboards An alphanumeric keyboard for a graphics system is used primarily as a device for entering text strings. Keyboards can also be provided with featur

How many bits are required for a ladder d/a converter, How many bits are re...

How many bits are required at the input of a ladder D/A converter, if it is required to give a resolution of 5mV and if the full scale output is +5V. Find the %age resolution.

Breifly explain memory-to-memory architecture, Memory-to-Memory Architectur...

Memory-to-Memory Architecture The pipelines can access vector operands intermediate and final results straight in main memory. This necessitates the higher memory bandwidth. Fu

Determine octant to hexadecimal conversion, What is the Octant to hexadecim...

What is the Octant to hexadecimal conversion of 734 ? Ans. (734) 8      = (1 D C) 16 0001 ¦ 1101 ¦ 1100 1         D         C

What is meant by refreshing of the screen, What is meant by refreshing of t...

What is meant by refreshing of the screen?  Some method is required for maintaining the picture on the screen. Refreshing of screen is completed by keeping the phosphorus glowi

Including the titles, Your company is planning a party for employees, and y...

Your company is planning a party for employees, and you have been asked to set up a spreadsheet to track the attendees and to measure the associated cost. Every employee is permitt

Functions for various communication modes, Q. Functions for various communi...

Q. Functions for various communication modes? MPI offers both non-blocking and blocking send/transmitting and receive operations for all modes. Functions for various commun

Types of validation controls provided by asp.net, Types of validation contr...

Types of validation controls provided by ASP.Net There are following types of validation controls provided by ASP.Net: 1. Required Field Validator 2. Compare Validator

What is the difference between activity and sequence diagram, The following...

The following are the difference among Activity and Sequence Diagrams: A sequence diagram represents the way of processes implement in a sequence. For example, the order of op

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