0% found this document useful (0 votes)
17 views

COMP 200 - Assignment #2

The document discusses converting between number bases and calculating the minimum number of bits needed in a memory address register for different memory sizes. For question 1, it provides the conversions between bases 4, 8, and 16 to decimal. For question 2, it calculates the minimum number of bits needed in the MAR for memory sizes of 1,000,000 bytes to 1,000,000,000 bytes using the logarithmic relationship between memory size and address bits.

Uploaded by

ramirez.mv.1994
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

COMP 200 - Assignment #2

The document discusses converting between number bases and calculating the minimum number of bits needed in a memory address register for different memory sizes. For question 1, it provides the conversions between bases 4, 8, and 16 to decimal. For question 2, it calculates the minimum number of bits needed in the MAR for memory sizes of 1,000,000 bytes to 1,000,000,000 bytes using the logarithmic relationship between memory size and address bits.

Uploaded by

ramirez.mv.1994
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment #2 – Chapter 4 (pg.

214)

1. Given our discussion of positional numbering systems in Section 4.2.1, see whether
you can determine the decimal value of the following numbers:

a. 133 (base 4)
133 = (1 × 4 2 ) + (3 × 4 1 ) + (3 × 4 0 )
133 = (1 × 16) + (3 × 4) + (3 × 1)
133 = (16) + (12) + (3)
133 = 31
Thus, the decimal value of 133 in base 4 is 31

b. 367 (base 8)
367 = (3 × 8 2 ) + (6 × 8 1 ) + (7 × 8 0 )
367 = (3 × 64) + (6 × 8) + (7 × 1)
367 = (192) + (48) + (7)
367 = 247
Thus, the decimal value of 367 in base 8 is 247

c. 1BA (base 16)


1BA = (1 × 16 2 ) + (11 × 16 1 ) + (10 × 16 0 ) where B = 11; A = 10
1BA = (1 × 256) + (11 × 16) + (10 × 1)
1BA = (256) + (176) + (10)
1BA = (256) + (176) + (10)
1BA = 442
Thus, the decimal value of 1BA in base 16 is 442

As an aside, for question #2 (pg. 214), the reason base 16 has letters from A (10) to E (15) is
because the Hindu-Arabic numerals we use today don’t have single digits past 9. As a result, we
use letters to ensure that we only occupy one space (or digit place) in base 16.

Schneider, G. M., & Gersting, J. L. (2012). Invitation to Computer Science (6th ed.). Cengage Learning.
Assignment #2 – Chapter 5 (pg. 270)

2. At a minimum, how many binary digits (bits) are needed in the Memory Address
Register (MAR) with each of the following memory sizes?

From page 224, we know that:


- N = “the number of binary digits (bits) used to represent an address”
- 2N = “the maximum memory size or the address space of the computer”
- Therefore, we know 2N, and we need to find the values for N

a. 1,000,000 bytes b. 10,000,000 bytes


1,000,000 = 2 N 10,000,000 = 2 N
1,000,000 = log 2 (1,000,000) 10,000,000 = log 2 (10,000,000)
1,000,000 = 19.93156… 10,000,000 = 23.25349…
1,000,000 ≈ 20 10,000,000 ≈ 24
1,000,000 ∴ N = 20 10,000,000 ∴ N = 24
Thus, at minimum, 20 bits are Thus, at minimum, 24 bits are
needed in the MAR needed in the MAR

c. 100,000,000 bytes d. 1,000,000,000 bytes


100,000,000 = 2 N 1,000,000,000 = 2 N
100,000,000 = log 2 (100,000,000) 1,000,000,000 = log 2 (1,000,000,000)
100,000,000 = 26.57542… 1,000,000,000 = 29.89735…
100,000,000 ≈ 27 1,000,000,000 ≈ 30
100,000,000 ∴ N = 27 1,000,000,000 ∴ N = 30
Thus, at minimum, 27 bits are Thus, at minimum, 30 bits are
needed in the MAR needed in the MAR

Schneider, G. M., & Gersting, J. L. (2012). Invitation to Computer Science (6th ed.). Cengage Learning.

You might also like