Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Show all your work. 1. Convert the following binary number to its decimal form: 1010.101 2. Convert the following binary integer using the Homer's method:

image text in transcribed
image text in transcribed
Show all your work. 1. Convert the following binary number to its decimal form: 1010.101 2. Convert the following binary integer using the Homer's method: 101010 3. Convert the following decimal number to binary: 4.1875 4. Convert the following decimal number to binary using the subtraction method: 120 5. Assume a short(int) is stored in 2 bytes, a long(int) is stored in 4 bytes. a. How many bytes are allocated by the declaration of each array? short a[9]; long b[250]; short t[8][7]; b. If the starting address of the array a is 500, what is the address of a[7]? c. If the starting address of array bis 1210, which array element is located at address 1294? d. If the starting address of t is 100 and storage is row major order, what is the address of t[3][2]? 6. Given the input stream KLMNPQR. What sequence of pop and push operations will produce the output MNQPLRK? 7. Convert each of the following postfix expressions to infix. a. AB/CD/ ABC/D/ 8. Convert each of the following infix expressions to postfix(where $ stands for exponentiation) a. (A-B)*(D/E) b. (A + B $D/(E-F) +G 9. In the following exercise, assume a = 7.0, b = 4.0, c = 3.0, and d= -2.0. Evaluate the postfix expressions: a. abc-d- b. abcd--- 10. Consider the following expression P, written in postfix notation: P: 12.7.3. -, 7, 2, 1, 5, +, a. Convert Pinto its equivalent infix expression b. Evaluate the infix expression 11. What is the output from the following sequence of stack operations? Stack S; int x-3, y = 8; S.push(9); S.push(x): S.push(y); xS.popO; y=S.popo: println(y): S.push(22); while(!S.StackEmpty) y=S.popO; println(y): println(x)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems Xxviii Special Issue On Database And Expert Systems Applications Lncs 9940

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Qimin Chen

1st Edition

3662534541, 978-3662534540

More Books

Students also viewed these Databases questions