Anatomy of a Computer

What's in the Box?

What is the Motherboard?

 

What is a CPU?

 

What is RAM?

 

How is RAM memory different from Hard-Disk Memory?

 

Besides CPU and RAM, what else is in the box?

 

Memory

What does the term "byte-addressable" mean?

 

 

What is the difference between '7' and 7?

 

 

What is a binary number?

 

 

How is the decimal number 7 represented in binary format?

 

 

 

Bits to Bytes to integers to strings

A single 0 or 1  is a binary digit, or a bit.

Of course, we want to represent numbers and words and other data which require multiple bits.

We say that 8 bits is a byte. Whole numbers (integers) are usually represented with 4 bytes, or 32 bits.

Just as the decimal number 93 is 9*101 + 9*100, the binary number 101 is 1*22+0*21+1*20=5 (decimal or base-10)

In general, the decimal value of a binary number can be computed by assigning ( digit * 2i) to the ith digit from the right.

So 1010 is: 8+0+2+0=10

155 decimal is:

In the past, symbols (e.g., letters, digits) were represented with one byte (8 bits), with each symbol being mapped to a number between 0-255. The ASCII table provides the mapping. Here's an on-line binary-decimal converter.

So as not to be English-centric, there is now Unicode, which can represent many different languages and requires 2 bytes (16 bits) for representation.

Problems

1. Consider the following sixteen bits:

0000 0000 0100 1101

a. What is the decimal value of the number if it represents a positive integer (whole number)?

b. What symbol does it represent? Here's an ASCII table

2. Encode the following decimal numbers in binary:    24    1698   43 

3. If 16 bits are used to encode positive integers, what is the largest number that can be represented?

4. What about negative numbers? How do you think these are represented?