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

CASSASDSAD

The document contains a quiz on logic circuits and switching theory with multiple choice and numerical questions testing knowledge of binary, octal, hexadecimal, and BCD conversions as well as logic gate operations. It also includes bonus questions about finding the number of fingers of a Martian based on an equation in their numerical system and using a balance to identify a counterfeit coin among 64 coins in the fewest weighings.

Uploaded by

James Eric
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)
82 views

CASSASDSAD

The document contains a quiz on logic circuits and switching theory with multiple choice and numerical questions testing knowledge of binary, octal, hexadecimal, and BCD conversions as well as logic gate operations. It also includes bonus questions about finding the number of fingers of a Martian based on an equation in their numerical system and using a balance to identify a counterfeit coin among 64 coins in the fewest weighings.

Uploaded by

James Eric
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/ 5

Quiz # 1

Logic Circuits and Switching Theory

Name: John Leo Arreglo Score:_______


Course and Year: BSEE-3 Date: 09/07/2022

I. CONVERSION. Write your answer in the space provided.


(2 points each)
1. Convert the following binary numbers to decimal.

BINARY DECIMAL

a. 1001101101 621
b. 101111 47
c. 110011001100 3276

2. Convert the following numbers to octal and hexadecimal


OCTA HEXADECIMAL
L
A. 1001011010112 4553 96B
B. 79110 1427 317
C. 982

D. Convert the following decimal numbers to binary.

DECIMAL BINARY

a. 73 1001001
b. 127 1111111
c. -63 -111111

D. Convert the following numbers to decimal.

DECIMAL

A. 7778 511

B. 10408 544

C. 3FF16 1023

E. Perform the following operations.

A. 1316 +2816 3B
B. 1100112 + 0011102 1000001
C. 278 + 318 60

F. Perform the following operations.

A. 2892 to BCD 001010001001


B. 01101001 BCD to binary 1000101

C. 2710 to BCD 1000101

C. Convert the following octal numbers to hexadecimal.

OCTAL HEXADECIMAL

A. 42 22
B. 63 33
C. 3047 627

C. Complete the table below with the equivalent value in the table below.
D. 8.
Decimal Binary Excess3 2421 Biquinary Octal Hexadecimal
0 0 0011 0000 0100001 0 0
1 1 0100 0001 0100010 1 1
2 10 0101 0010 0100100 2 2
3 11 0110 0011 0101000 3 3
4 100 0111 0100 0110000 4 4
5 101 1000 0101 1000001 5 5
6 110 1001 0110 1000010 6 6
7 111 1010 0111 1000100 7 7
8 1000 1011 1110 1001000 10 8
9 1001 1100 1111 101000 11 9
10 1010 1101 - - 12 A
11 1011 1110 - - 13 B
12 1100 1111 - - 14 C
13 1101 10000 - - 15 D
14 1110 10001 - - 16 E
15 1111 10010 - - 17 F

II. Problem Sets: (5 points each)


1. The following is encoded as an ASCII code. What is the message?

1001010 1101111 1101000 1101110 0100000 1000100 1101111 1100101

Ans. John Doe


2. How many bytes are in a 32-bit string? 4 bytes

3. How many bytes are needed to represent the value 846,569 in BCD? 3 bytes
4. A typical PC uses a 20-bit address code for its memory locations.
(a)How many hex addresses are needed to represent a memory address?
(b)What is the range of the addresses?
(c) What is the total number of memory locations?
a. 5
b. 0000016 to FFFFF16
5
c. 16 = 1,048,576

5. An operator is typing in a BASIC program at the keyboard of a certain microcomputer. The computer converts each keystroke
into its ASCII code and stores the code as a byte in memory. Determine the binary strings that will be entered into memory
when the operator types in the following BASIC statement:

GOTO 25 (Note: Include the space between)

Ans.
a. G 01000111
b. O 01001111
c. T 01010100
d. O 01001111
e. (space) 00100000
f. 2 00110010
g. 5 00110101

BONUS QUESTIONS: (5 points each)


1. A flying saucer crashes in a Nebraska cornfield. The FBI investigates the wreckage and finds an engineering manual
containing an equation in the Martian number system: 325 + 42 = 411. If this equation is correct, how many fingers would
you expect Martians have? Explain.
6 fingers
Step-by-step explanation:

Let X = the base of the numbers above

If X > 0

Then we have:

325 = 3 * X² + 2 * X¹ + 5 * X°

325 = 3X² + 2X + 5

42 = 4*X¹ + 2*X°

42 = 4X+ 2
And

411 = 4*X²+ 1*X¹ 1*X°

42 = 4X² + X + 1

Since 325 + 42= 11 then

3X² + 2X + 5 + 4X+ 2 = 4X² + X + 1 ------ Collect Like Terms

3X² - 4X² + 2X + 4X - X + 5 + 2 - 1 = 0

-X² + 5X + 6 = 0 ------- Multiply both sides by -1

X² - 5X - 6 = 0 ------- Factorise the Equation

X² - 6X + X - 6 = 0

X(X - 6) + 1( X - 6) = 0

(X + 1)(X - 6) = 0

X + 1 = 0 or X - 6 = 0

X = -1 or X = 6

But X>0

So, X =-1 is invalid

X=6

The expected number of fingers of the Martian is 6

2. The king receives 64 gold coins in taxes but has reason to believe that one is counterfeit. He summons you to identify the
fake coin. You have a balance that can hold coins on each side. How many times do you need to use the balance to find the
lighter, fake coin? Explain.

The simplest way is to split the 64 coins into two lots of 32 and compare them.

Then take the lighter pile, halve it and compare again.

Halving each time will find the fake coin in 6 weighings.

64 —> 32 —> 16 —> 8 —> 4 —> 2 —> 1

You can find the light fake coin in only 4 weighings on a balance scale.

Split the 64 coins into two piles of 21 coins and a pile of 22

Compare the 21 piles. If one is lighter again split them into three piles of 7.

Compare two of the 7 piles

If one is lighter split it into two 2 piles and a 3 pile


Compare the two 2 piles.

If one is lighter compare the two coins to find the fake.

If the two 2 piles are equal then the the fake in in the 3 pile.

Compare two of the coins to find the fake (if equal it must be the other one)

If the 21 piles are equal choose the 22 pile and split it into two piles of 7 and 8 left out

Compare two of the 7 piles. If one is lighter follow the instructions above.

To test the 8 pile split it into two 3 piles and a 2 pile and follow the previous instructions.

This sounds very complicated but does take less time

You might also like