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

Which two properties are on every validation control, Which two properties ...

Which two properties are on every validation control?  Two properties are:- a) Control to validate b) Error Message.

Compute the frequency of the radiation, Q. The work function of a metal sur...

Q. The work function of a metal surface is 6.626 X 10-19 joule. Compute the frequency of the radiation? Work function                                     W = hγ o The fre

Explain data warehousing, data warehousing Data warehouse means  ...

data warehousing Data warehouse means  Subject oriented Integrated Time variant Non-volatile collection of data for management's decisions. It is h

What is the prominence of rs232-c in serial communication, What is the prom...

What is the prominence of RS232-C in serial communication?  Name some application where you see its use.  RS-232 stands for Recommend Standard number 232 and C is the latest re

Functions of an operating system, a) In multitasking Operating Systems, th...

a) In multitasking Operating Systems, there are two types of multitasking such as the "Preemptive Multitasking" and the "Cooperative Multitasking". Describe the two mentioned mult

What is digital signature, Digital Signature is Software to recognize si...

Digital Signature is Software to recognize signature

Meaning of every field in mips instruction, Q. Meaning of every field in MI...

Q. Meaning of every field in MIPS instruction? The meaning of every field in MIPS instruction is given below: op: operation code or opcode rs: First register source

Minimum total number of shelv, Write a program that finds the minimum total...

Write a program that finds the minimum total number of shelv, C/C++ Programming

Minimize the logic function using NAND gate, Minimize the logic function F(...

Minimize the logic function F(A, B, C, D) = ∑ m(1,3,5,8,9,11,15) + d(2,13) using NAND gate with help of K-map. Ans. Realization of given expression by using NAND gates:  In

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