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

Computer Network, Write a short notes on transition from IPv4 to IPv6

Write a short notes on transition from IPv4 to IPv6

What is the difference among save and save as, Use SAVE when you are revisi...

Use SAVE when you are revising an existing document. Use SAVE AS when you are making a new document from scratch or an existing document. This will remain the original document

Determine the object design of object oriented modelling, Determine the Obj...

Determine the Object Design of Object oriented modelling Object Design:   At this phase, a design model is created based on the analysis model which is already created in the

Determine Boolean identities using Boolean algebra, Prove the following ide...

Prove the following identities   a. A ‾B ‾C‾ + A ‾BC ‾ + AB ‾C ‾ + ABC ‾ = C ‾ b. AB + ABC + A ‾ B + AB ‾C = B + AC Ans. a. LHS = A'B'C' + A'BC' + AB'C' + ABC' =

What is the role of a controller in an mvc application, The controller resp...

The controller responds to user interactions, with the application, by selecting the act method to implement and also selecting the view to render.

Double negation, Double Negation : All parents are forever correcting ...

Double Negation : All parents are forever correcting their children for the find of double negatives,  there we have to be very alert with them in natural language like: "He d

What is a multiple line field, What is a multiple line field? A multipl...

What is a multiple line field? A multiple line field is a special part of field which allows the user to enter multiple lines of data into it.

Binary search, Binary Search Now that the basic framework is working, ...

Binary Search Now that the basic framework is working, it is time to begin implementing a few alternative search functions. Each of these search algorithms have strengths and

Exit the loop on end-of-file, Continuing in main, write a loop that will re...

Continuing in main, write a loop that will read from the ifstream that reads enough information to  create a person object (i.e. first name, last name, and weight).  Exit the loop

Describe about immediate addressing mode, Q. Describe about Immediate Addre...

Q. Describe about Immediate Addressing mode? When an operand is interpreted as an immediate value for example LOAD IMMEDIATE 7 it is actual value 7 which is put in CPU register

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