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

CS20Probset1

The document is a problem set for a computer science course at the University of the Philippines Diliman. It includes exercises on number base conversions, hexadecimal representations, and questions regarding the number of digits in various bases. Additionally, it contains true/false style questions related to properties of numbers in different bases.

Uploaded by

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

CS20Probset1

The document is a problem set for a computer science course at the University of the Philippines Diliman. It includes exercises on number base conversions, hexadecimal representations, and questions regarding the number of digits in various bases. Additionally, it contains true/false style questions related to properties of numbers in different bases.

Uploaded by

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

Problem Set 1

Department of Computer Science


College of Engineering
University of the Philippines Diliman

1. Convert 141425 to
(a) Base 2
(b) Base 4
(c) Base 6
(d) Base 30
No need to write the base subscript.
2. Consider the hexadecimal number B1B0 .
For the following subitems, use the alphanumeric characters 0123456789ABC...XYZ
for the digits of numbers represented up to base 36.
(a) Write the hexadecimal number B1B0 in binary. No need to write
the base subscript.
(b) Write the hexadecimal number B1B0 in octal. No need to write the
base subscript.
(c) Write the hexadecimal number B1B0 in base 32. No need to write
the base subscript.
(d) If B1B0 is treated as the signed-magnitude representation of an in-
teger, what integer does it represent? Write it in decimal, without
the base subscript.
(e) If B1B0 is treated as the unsigned-magnitude representation of an
integer, what integer does it represent? Write it in decimal, without
the base subscript.
3. For each of the following, answer with always, never, or sometimes.
Also, assume that each variable stands for an integer greater than 5.

(a) If b1 > b2 , then x has more digits in base b1 than in base b2 .


(b) If b1 < b2 , then x has more digits in base b1 than in base b2 .
(c) If x1 > x2 , then x1 has more digits in base b than x2 has in base b.
(d) If x1 < x2 , then x1 has more digits in base b than x2 has in base b.
(e) In base b, bk x has exactly k more digits than x.
(f) In base b, (bk − 1)x has exactly k more digits than x.
(g) In base b, (bk + 1)x has exactly k more digits than x.

1 1st Semester 2024–2025


(h) In base b, bk x − 1 has exactly k more digits than x.
(i) In base b, bk x + 1 has exactly k more digits than x.
25
4. How many digits does 515 have in base 35?

2 1st Semester 2024–2025

You might also like