Solutions for Conversions, Truth Table, Assembly Language, RAM Chips, ASCII Message, and more

Verified

Added on  2023/04/12

|6
|1185
|108
AI Summary
This document provides solutions for various topics including conversions, truth table, assembly language, RAM chips, ASCII message, and more. It is a study material for computer science and engineering courses. The solutions are presented in a clear and ordered manner, with work shown where necessary. Suitable for students looking for solved assignments and study material.
tabler-icon-diamond-filled.svg

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
Solutions must be clear and presented in the order assigned. Solutions must show work needed,
as appropriate, to derive your answers. Full credit for correct answers will only be granted if
the work is shown.
1. [ 9 Points ] Perform the following conversions: a.)
(101101.0101)2 =
2^5 + 2 ^ 3 + 2 ^ 2 + 2 ^ 0. 2 ^ -2 + 2 ^-4 = 45.3125 (base 10)
b.) (ABC.123)16 =
(16^2) * 10 + (16^1) * 11 + (16^0) * 12. (16 ^-1) * 1 + (16 ^-2) * 2 + (16^-3) * 3 =
2748.071045(base 10)
c.) (7831.75)10 =
4096 + 2048 + 1024 + 512 + 128 + 16 + 4 + 2 + 1 +.50+.25
2 ^ 12 + 2 ^11 + 2^10 + 2^9 + 2^7 + 2 ^4 + 2 ^ 3 + 2 ^ 2 + 2 ^ 1 + 2 ^ -1 + 2 ^-2
1 1110 1001 0111.11 (base 2)
2. [ 16 Points ] Consider the following truth table that defines inputs X0, X1, and
X2, and outputs Y0 and Y1.
X0 X1 X2 Y0 Y1
0 0 0 1 0
0 0 1 1 0
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 1 1
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
1 1 1 1 1
a.) Write a Boolean expression for Y1.
X0/X1 X2 00 01 11 10
0 1 1
1 1 1 1
Y1 = X0X2 + X1
b.) Use Logisim to model the combinational logic circuit that produces Y1. Test your
circuit to be sure your circuit produces the output Y1 shown in the truth table above.
Add your name and email address as part of the drawing and label the inputs and
output appropriately.
Don’t forget to submit your circuit file.
Inputs: X0-X1-X2
Output: Y1
3. [ 2 Points ] This common method used to increase CPU throughput can result in
destructive overheating of the CPU. What is this method called?
OVERCLOCKING
4. [ 3 Points ] Write the assembly language equivalent of the following MARIE machine
language instruction: 0010111111100100.
Opcode = 0010 (bits 15-12) Address: 0xFE4 (bits 11-0)
0010 is opcode for Store X where X is location specified in address bits
Therefore, instruction is
STORE X Where X= FE4.
Document Page
5. [ 12 Points ] Write the following code segment in MARIE's assembly language:
If X <= 1 Then
Y = 3
Else
Y = 0
Endif
ORG 100
Load X / Load x to check value
Subt Two / x = x -2
/ this will lead AC to negative value if x <=1.
Skipcond 000 / if AC negative skip next instruction
Jump cond_false / else jump to label
Load Three / condition true, Load Y
Jump update_y / jump to update Y
cond_false, Load Zero / condition false, Load Y alternate value
update_y, Store Y / Update Y
Halt / End program
Zero, HEX 0 / data constant
Two, HEX 2 / data constant
Three, HEX 3 / data constant
X, HEX 2 / Variable value X
Y, HEX 10 / Variable value Y
6. [ 4 Points ] Suppose that a 4M x 16 main memory is built using 512K × 8 RAM chips and
memory is word-addressable.
a.) How many RAM chips are necessary?
Total Capacity = 4M X 16
Capacity Per Chip = 512K X 8
Chips Required = Total Capacity / Capacity Per Chip
= 4M X 16 / 512K X 8 = 8 X 2 = 16
b.) How many address bits are needed for each RAM chip?
Bits required for 512K(512 * 1024) locations = Log2512 + Log21024= 9 + 10 = 19 bits
7. [ 4 Points ] Decode the following ASCII message, assuming 7-bit ASCII characters and no
parity:
As per look up from ASCII Table
1010100 0x54 = T
1100101 0x65 = e
1100011 0x63 = c
1101000 0x68 = h
Document Page
8. [ 3 Points ] The music group The Beatles’ "core catalogue", recorded in 1962–1970, is said to
be 217 songs totalling approximately ten hours of music. You want to represent each song with
a separate symbol in your computer. How many bits do you need represent all the symbols with
a code on the computer using the least number of bits?
Round up (Log2217) = 8 bits
9. [ 4 points] Suppose a computer has 16-bit instructions. The instruction set consists of 32
different operations. All instructions have an opcode and two address fields (allowing for two
addresses). The first of these addresses must be a register, and the second must be memory.
Expanding opcodes are not used. The machine has 16 registers. What is the maximum
allowable size for memory?
Opcode = Log232 = 5 bits, registers = Log216 = 4 bits
Bits left for memory = 16 - 5 - 4 = 7 bits
Addressable memory = 2 ^ 7 = 128 locations
10. [ 12 Points ] The number 15 when represented as unsigned integer with 4 bits is 1111.
a.) The number X when represented as signed magnitude is 1111. What is X?
b.) The number X when represented as 1’s complement is 1111. What is X?
c.) The number X when represented as 2’s complement is 1111. What is X?
d.) The number X when represented as Excess-7 is 1111. What is X?
a. Sign bit = -1 , Magnitude = 111 = 7 ; Result = -7
b. 1’s complement of 1111 = 0000; Result = 0
c. 1111 is 2’s Complement of 0000 + 1 = 0001 (Represents Magnitude); Result = -1
d. 1111 = 15 , Excess 7 means 15 -7 ; Result = 8
11. [ 12 Points ] The value shown below is represented using the IEEE 754 single-
precision format. Convert to a signed decimal number.
11101010111010000000000000000000
Sign = 1
Exponent = 11010101 = 213 i.e.
After removing the bias of 127 Exponent is 2 ^ 213 - 2 ^ 127= 2 ^ 86
Mantissa = 110 1000 0000 0000 0000 0000
Add 1 in MSB for Denormalization and convert to Decimal
Decimal = 15204352
Result = -15204352 * 2 ^ 86
12. [ 3 Points ] Computers designed using the Harward architecture have two buses:
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
one for data and one for instructions.
13. [ 8 Points ] For the following MARIE program:
ORG 100
Load Z
Load W
Subt Y
JnS Foo
Halt
Foo, HEX 0
Load Y
Add X
JumpI Foo
X, Hex 7
Y, Hex F
Z, Hex 3
W, Hex 7
What is the value in the AC (hex) when the program halts?
Acc
0->3 -> 7 -> FFF8 -> Jump to Foo-> F -> 16 -> Return
0x0016
14. [ 8 Points ] Show how the following value would be stored by byte-addressable
machines with 32-bit words by filling in the appropriate memory locations, using big
endian and then little endian format. Assume each value starts at address 0x10.
VALUE: 0xAC208
Address —> 0x10 0x11 0x12 0x13 0x14 0x15
Big Endian 00 AC C2 08
Little Endian 08 C2 AC 00
Document Page
chevron_up_icon
1 out of 6
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]