Chapter 1

Data Representation

Modified

Binary Numbers

Digital devices use binary numbers.

Decimal numbers are arranged with the most significant digit on left side and least significant digit on right.

A 16-bit binary number:

 

1.3.3    Storage sizes

Standard sizes in bits:

 

Ranges of Unsigned Integers:

 

Data Representation

Must know number of bits used to represent data.

In the following for convenience we'll use just 4 bits to represent numbers.

Question - Using 6-bit values:

  1. Represent -17 as 2's complement.
     
  2. Represent 10 as 2's complement.
     
  3. 10+(-17) using 2's complement representation.
     
  4. Show that the 2's complement result of Question 3 is correct by converting to decimal.
     

 

   

ASCII

Characters are represented by a code number, the character A is number code 6510 or 4116, or 010000012.

Character 7 is number code 5510 or 3716, or 001101112.

Character A is in row 4 and column 1 so is code 4116.

Character M is in row D16 and column 4 so is code D416.

ASCII chart

  

 

1.4    Boolean Operations

Boolean operations

 

Operation Precedence

  1. Not
  2. And
  3. Or

 

Truth table for ØX v Y