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 quadratic probing with respect to hashing technique, Quadratic prob...

Quadratic probing: In the above case when the first insertion is made the probability of latest element being inserted in a certain position is 1/n    where n is the size of the a

Optimum solution based on constraint problems, Optimum solution based on co...

Optimum solution based on constraint problems: Whether depending on what solver you are using so there constraints are often expressed as relationships between variables as e.

Compare single bus structure and multiple bus structure, Compare single bus...

Compare single bus structure and multiple bus structure? A system that having only one bus(i.e only one transfer at a time) is known as a single bus structure. A system is know

What is path testing, Explain path testing.   Path Testing: Testing in ...

Explain path testing.   Path Testing: Testing in which all paths in the program source code are tested at least once. Path testing has been one of the first test methods, and e

Explain integrated disk electronics devices, Q. Explain Integrated Disk Ele...

Q. Explain Integrated Disk Electronics Devices? IDE devices are associated to PC motherboard by a 34-wire ribbon cable. Common drive used today for workstations has capacities

Define about exe programs, Q. Define about EXE Programs? An EXE program...

Q. Define about EXE Programs? An EXE program is stored on disk with extension .exe. EXE programs are longer than COM programs as every EXE program is related with an EXE header

What is software interrupt, What is software interrupt?   A software in...

What is software interrupt?   A software interrupt is initiated by implementing an instruction.  Software interrupt is a special call instruction that behaves like an interrupt

How do you track down a transition by name, Question 1: a) How do you ...

Question 1: a) How do you track down a transition by name? b) Why Premiere Pro is considered a non-linear editor? c) Explain clearly the main problem that may arise wh

Algebra, Discrete Mathematics - (A?B)-(AnB)=(A-B)?(B-A) - prove by cases?? ...

Discrete Mathematics - (A?B)-(AnB)=(A-B)?(B-A) - prove by cases?? State which law you have used at each step. I''ve just started learning this, this semester .. and i havnt quite

Define the terms - spatial locality and temporal locality, Define the terms...

Define the terms : spatial locality and temporal locality. Spatial Locality:  The spatial aspect means that instructions in close proximity to a recently implemented instruct

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