# 20155001/User talk:Mwright96/Homework 4

### From CDS 130

## Contents |

# 1. Megabytes

- How many bits are contained in 4 kilobytes?

32,768 bites

- How many bits are contained in two megabytes?

16,777,216 bites

- How many bits are contained in 8 gigabytes?

68,719,476,740 bites

# 2. Memory storage

The 1984 science fiction novel *Neuromancer* by William Gibson contains 271 pages of text. Each page contains, on average, approximately 400 words. Each word, is on average, five ASCII characters long. Knowing that each ASCII character requires 8 bits of computer memory storage, how many BYTES of computer memory storage are required to store all the words from Gibson's *Neuromancer* novel?

A. 271,000 bytes B. 34,688,000 bytes C. 4,336,000 bytes D. 542,000 bytes

D. 542,000 bytes

# 3. Computer Memory

Newer personal computers (as of Fall 2010) can come equipped with hard disk drives having 1 terabyte of storage capacity (a terabyte is one trillion bytes, or: 1,000,000,000,000 bytes). Let's assume that you purchase a new computer from Patriot Computers, and, that it comes equipped with a 1 terabyte hard disk drive. Approximately how many copies of William Gibson's *Neuromancer* novel could you store on your 1 terabyte hard disk drive, assuming the entire disk is available for storage?

A. About 1,845,000 copies B. About 230,627 copies C. About 28,828 copies D. About 3,690,000 copies

B. 230,627 copies

The correct answer is A (-1pt)

# 4. Encoding

A forensic computer scientist finds the following list of binary values on a hard drive (spaces added to improve readability): 01001100 01001111 01001100. Assuming that the information is encoded as 8-bit ASCII, what does this series number represent in terms of characters from the 8-bit ASCII table?

KOK

The correct answer is LOL (-1pt)

# 5. Encoding I

The 7-bit Extended ASCII character set relates 128 binary numbers to 128 commonly used characters in the English language (technically, not all are characters, but ignore this fact). For example, `1100001`

corresponds to the character "a" and `1000001`

corresponds to the character "A".

The Chinese character set is composed of unique characters that taken together comprise the written Chinese language. A college-educated Chinese adult is fluent with 6,000 to 7,000 unique Chinese characters.

How many **bits** are required to represent the entire set of written Chinese characters for a college-educated Chinese adult? How may **bytes**?

2040 bites

255 bytes

The correct answer is 13 bits and 2 bytes (-1pt)

# 6. Logic Gates

Universal gates are the ones which can be used for implementing any gate like AND, OR and NOT, or any combination of these basic gates; NAND and NOR gates are universal gates.

### 6.1. Form an XNOR logic gate using NAND gates exclusively

### 6.2. Form an AND logic gate using NOR gates exclusively

# 7. Equivalent Logic Gate

What one logic gate is equivalent to the logic circuit shown below? Draw the logic gate.

This makes an OR gate.

# 8. Combination of NANDs

All types of logic gates covered in class can be created from suitable combinations of NAND gates. In the image below, four NANDS are connected and three of the inputs are set to `1`

. What kind of logic relation does it create?

AND gate

The correct answer is NOR gate (-1pt)

# 9. Logic Circuits I

For the logic circuit given below, determine the values of W, X, Y and Z.

If: A = 0, B = 0, C = 1

A. W =1, X =1, Y = 0, Z = 1 B. W =1, X =1, Y = 1, Z = 1 C. W =1, X =0, Y = 1, Z = 1 D. W =1, X =0, Y = 1, Z = 0 E. W =1, X =1, Y = 0, Z = 0

Answer:

A. W =1, X =1, Y =0, Z =1

# 10. Logic Circuit

Consider the following logic circuit, with inputs A, B, C and D, and outputs X and Y. Which output CANNOT BE COMPUTED for ANY assignment of 1 or 0 to inputs A, B, C and D? (Note: Each of the four inputs, A, B, C and D must be assigned a value of either 1 or 0)

A. Output X = 0 and Y = 0 cannot be computed |

B. Output X = 0 and Y = 1 cannot be computed |

C. Output X = 1 and Y = 0 cannot be computed |

D. Output X = 1 and Y = 1 cannot be computed |

E. All four outputs can be computed |

Answer:

A. Output W = 0 and Y = 0 cannot be computed

The correct answer is C (-1pt)

# 11. Logic Circuit

Fill out the truth table for the following circuit. What do you think this circuit is ( what is this circuit used for)?

ABC | D |
---|---|

000 | 1 |

001 | 0 |

010 | 1 |

011 | 1 |

100 | 1 |

101 | 0 |

110 | 0 |

111 | 0 |

The correct answer is 00011101 (-1pt)