Groups of two-state devices are used to represent data in a computer. In general, we say the states are either: high/low, on/off, 1/0, ...
P#1: How many combinations can be represented by a group of three of these two-state devices?
P#2: Give a general formula for the number of combinations of a group of N of these two-state devices.
We will assume that the memory cell size is 8-bits for the purposes of discussion. You should be able to apply the concepts to memory cell sizes of n-bits.
Q#1: How many different unsigned numbers can be represented in 8-bits?
P#1: Let's write out the first 3 unsigned integers and the last 2 under the following column headings.
Bit Pattern Modulo(2^8) Integer ----------- -------------------It is important to note that the Intel processors use the modulo 2^n number system to represent unsigned integers. It is also important to know that in C++ when an integer is declared as say: unsigned int x; that x is represented in modulo 2^n representation.
Q#2: How many bytes are allocated to an unsigned int in C++?
Q#1: What is the range of integers that can be represented in 8-bits?
Q#2: What is the general formula for this range using N-bits?
Q#3: How many representations of zero exist?
Q#4: What is the representation of 127.
Q#5: If we add one to the value in Q#4, what do we end up with?
P#1: Fill in the table (first 2 & last 2 ) below:
Bit Pattern Signed Magnitude ----------- ----------------
Q#1: What is the range of integers that can be represented in 8-bits?
Q#2: What is the general formula for this range using N-bits?
Q#3: How many representations of zero exist?
Q#4: What is the representation of 127.
Q#5: If we add one to the value in Q#4, what do we end up with?
P#1: Fill in the table (first 2 & last 2 ) below:
Bit Pattern One's Complement ----------- ----------------
Q#1: What is the range of integers that can be represented in 8-bits?
Q#2: What is the general formula for this range using N-bits?
Q#3: How many representations of zero exist?
Q#4: What is the representation of 127.
Q#5: If we add one to the value in Q#4, what do we end up with?
P#1: Fill in the table (first 2 & last 2 ) below:
Bit Pattern Two's Complement ----------- ----------------
The final representation of data is ASCII (American Standard Code for Information Interchange) which is a 7-bit code. With 7-bits a total of 128 characters can be represented.
The first 32 binary codes represent control characters and are unprintable. The remaining are printable characters such as A or ! and so on. For the IBM PC, the code has been extended to an 8-bit code in which case the first 128 codes are the standard ASCII characters and the remaining 128 codes are an extended ASCII character set to include a variety of symbols to include graphics and the like.