All of the work in this project is my own!  I have not left copies of my code in public folders on university computers. I have not given any of this project to others. I will not give any portion of this project to others taking this class. I realize that the penalty for turning in work that is not my own can range from an "F" in the class to dismissal from Trinity University. 

                                                                                             Print Name  __________________________

                                                                                              Signature   __________________________

                                                                                             Print Name  __________________________

                                                                                              Signature   __________________________

                                                                                             Print Name  __________________________

                                                                                              Signature   __________________________
 


Numeration Systems Lab
Team (1-3 Persons)  Assignment
All Members Of The Team Should Do Problems & Then Compare Answers
20  Points


Complete Without A Calculator - You May Use A Calculator To Check Answers!

Set Netscape Margins [ Left = 1; Right = .2; Top = .6; Bottom = .6; Select Document Title, Location,  Page Number, Page Total Black Text l]

Digits,  Numeration, & Counting

1] Valid digits for the Decimal Numeration System are 0, 1, 2,                                                                             , 9

2] Write the first 25 (base 10)  numbers in the Decimal Numeration System.  1, 2,

                                                                                                                                                             , 25

3] Valid digits for the Binary  Numeration System are _____________________________________________________

4] Write the first 25 (base 10)  numbers in the Binary  Numeration System.  1, 10, 11, 100

                                                                                                                                                            , 25

5] Valid digits for the Octal Numeration System are 0, 1, 2,                                                                             , 7

6] Write the first 25 (base 10)  numbers in the Octal Numeration System.  1, 2,  3, 4, 5, 6, 7, 10, 11, 12,

                                                                                                                                                            __

7] Valid digits for the Hexadecimal Numeration System are 0, 1, 2,  3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

8] Write the first 35 (base 10)  numbers in the Octal Numeration System.  1, 2,  3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F,

10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B,
 



Conversion - Base 10 to Base 2 - Decimal To Binary

Sample]  69 (base 10) = ______________________________________________ (base 2)
69 (Base 2)    Quotient | Remainder
69 / 2 =           34   |   1
34 / 2 =           17   |   0
17 / 2 =           8   |   1
8 / 2 =             4   |   0   /\
4 / 2 =             2   |   0   ||
2 / 2 =             1   |   0   || Read Up
1 / 2 =             0   |   1   --------------> 1 0 0 0 1 0 1

Sample]  69 (base 10) =  1 0 0 0 1 0 1  (base 2)

1]   127 (base 10) = _______________________________________________ (base 2)

2]   35,000 (base 10) = _______________________________________ (base 2)

3]   32,767 (base 10) = _______________________________________ (base 2)


Conversion - Base 10 to Base 8 - Decimal To Hexadecimal


Sample]  69 (base 10) = ____________________________________________ (base 8)
69 (Base 8)    Quotient | Remainder
69 / 8 =            8   |   5
8 / 8 =             1   |   0
1 / 8 =             0   |   1 --------------> 1 0 5
Sample]  69 (base 10) =  1 0 5  (base 8)

4]   127 (base 10) = _______________________________________________ (base 8)

5]   35,000 (base 10) = _______________________________________ (base 8)

6]   32,767 (base 10) = ________________________________________ (base 8)


Conversion - Base 10 to Base 16 - Decimal To Hexadecimal


Sample]  74 (base 10) = ____________________________________________ (base 16)
74 (Base 16)    Quotient | Remainder
74 / 16 =           4   |   A
4 / 16 =            0   |   4  --------------> 4 A
Sample]  74 (base 10) =  4 A  (base 16)

7]   127 (base 10) = _______________________________________________ (base 16)


Conversion - Base 2 to Base 10 - Binary To Decimal


Sample]    1  0  0  0  1  0  1 (base 2) = ______ (base 10)
                  2^6             2^5             2^4            2^3              2^2            2^1               2^0        Place Value Base 2
     64   32   16    8    4    2    1   Evaluated Place Value
     1 * 64 + 1 * 4 + 1 * 1 = 69   Solution
Sample]    1  0  0  0  1  0  1 (base 2) =  69 (base 10)

8]   111111 (base 2) = _______________________________________________ (base 10)

9]   1000100010111000 (base 2) = _________________________ (base 10)

10] 11111111111111 (base 2) = ___________________________ (base 10)


Conversion - Base 8 to Base 10 - Octal To Decimal


Sample]    1   0   5 (base 8) = ______ (base 10)
                  8^2                8^1                8^0        Place Value Base 8
     64     8      1  Evaluated Place Value
     1 * 64 +  5 * 1 = 69   Solution
Sample]    1  0  5 (base 2) =  69 (base 10)

11]   77 (base 8) = _______________________________________________ (base 10)

12]   104270 (base 8) = ______________________________________ (base 10)

13] 77777 (base 8) = ________________________________________ (base 10)


Conversion - Base 16 to Base 10 - Hexadecimal To Decimal


Sample]    4   A (base 16) = ______ (base 10)
                  16^1               16^0        Place Value Base 16
     16      1   Evaluated Place Value
     4 * 16 +  A(10) * 1 = 74   Solution
Sample]    4   A (base 2) =  74 (base 10)

14]   7F (base 16) = _______________________________________________ (base 10)

15]  A  0  F (base 16) = __________________________________ (base 10)


Conversion - Base 8 to Base 2 - Octal To Binary


Sample]        7    4    (base 8) = ______ (base 2)
                    1 1 1                    1 0 0    Equivalent 3-Digit Binary Representation
Sample]       7    4 (base 2) =  111100 (base 2)

16]   77 (base 8) = _______________________________________________ (base 2)

17]   104270 (base 8) = ______________________________________ (base 2)

18] 77777 (base 8) = ___________________________________________ (base 2)


Conversion - Base 2 to Base 8 - Binary  To Octal
Sample]    1  0  0  0  1  0  1 (base 2) = ______ (base 8)
                ____       _________________       _________________  Mark Off Sets of 3 Right To Left
      1       0              5      Equivalent Octal Value

Sample]    1  0  0  0  1  0  1 (base 2) =  105 (base 8)

19]   111111 (base 2) = _______________________________________________ (base 8)

20]   1000100010111000 (base 2) = _________________________ (base 8)

21] 111111111111111 (base 2) = ___________________________ (base 8)


Conversion - Base 16 to Base 2 - Hexadecimal To Binary


Sample]    4   A (base 16) = ______ (base 10)
                 0100               1010   Equivalent 4-Digit Binary Representation
Sample]    4   A (base 2) =  1001010 (base 2)

22]   7F (base 16) = _______________________________________________ (base 2)

23]  A  0  F (base 16) = __________________________________ (base 2)


Conversion - Base 2 to Base 16 - Binary  To Hexadecimal
Sample]    1  0  0  0  1  0  1 (base 2) = ______ (base 16)
                __________________     __________________________  Mark Off Sets of 4 Right To Left
           4             5            Equivalent Octal Value

Sample]    1  0  0  0  1  0  1 (base 2) =  45 (base 8)

24]   111111 (base 2) = _______________________________________________ (base 8)

25]   1000100010111000 (base 2) = _________________________ (base 8)

26] 111111111111111 (base 2) = ___________________________ (base 8)


Web Converter
http://javascript.internet.com/calculators/binary-converter.html

Limits on Information Representation
A char is 1 byte (8 bits).
Acceptable values are 0 - 255.

A complete ASCII table, with their appropriate HEX, DECIMAL, & OCTAL values may be found at

http://members.tripod.com/~plangford/ascii.html

A short int must be at least 1 byte (8 bits). It may be more on some compilers.
127 <==> -128 [at least]  +/- 127 OK for us

An int must be at least 2 bytes  (16 bits). It may be more on some compilers.
32,767 <==> -32,768 [at least]  +/- 32,767 OK for us

An long int must be at least 4 bytes (32 bits). It may be more on some compilers.
2,147,483,647 <==> -2,147,483,648 [at least] +/- 2 billion OK for us

A C/C++ header, called limits.h,  may be examined to determine the appropriate range for your specific compiler.


short int - Computer Representation in Memory (1 byte)

  Sign Bit ----------------|
                           |
                         bit #      7       6       5       4       3       2       1       0
                --|------------------------------
+15 =           | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
                ---------------------------------
1's Complement    1   1   1   1   0   0   0   0
                                             +1
                ---------------------------------
-15 =           | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 |
                ---------------------------------

[27] Sketch the short int [1 byte] memory representation of  88 (base 10) and - 88 (base 10).

                ---------------------------------
+88 =           |   |   |   |   |   |   |   |   |
                ---------------------------------
1's Complement
                                             +1
                ---------------------------------
-88 =           |   |   |   |   |   |   |   |   |
                ---------------------------------


int - Computer Representation in Memory (2 bytes)

  Sign Bit --|
             |         High Byte                         Low Byte
           --|------------------------------  ---------------------------------
        bit #    15   14   13   12    11   10    9    8         7    6    5     4    3     2    1    0
           --|------------------------------  ---------------------------------
+130=      | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |  | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
           ---------------------------------  ---------------------------------
1's Comp     1   1   1   1   1   1   1   0      1   1   1   1   1   1   0   1
                                                                           +1
           ---------------------------------  ---------------------------------
-130=      | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 |  | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 |
           ---------------------------------  ---------------------------------

28] Sketch the int 2 byte] memory representation of  515 (base 10) and - 515 (base 10).

           ---------------------------------  ---------------------------------
+515=      |   |   |   |   |   |   |   |   |  |   |   |   |   |   |   |   |   |
           ---------------------------------  ---------------------------------
1's Comp
                                                                           +1
           ---------------------------------  ---------------------------------
-515=      |   |   |   |   |   |   |   |   |  |   |   |   |   |   |   |   |   |
           ---------------------------------  ---------------------------------
29]  Circle the Sign Bit for both 515 and -515.

30] Label the High Byte and the Low Byte in the sketch of 515 and -515. The High Byte will always be the left-most byte. The Low Byte will always be the right-most byte. The Sign Bit will always be the left-most bit.


long int - Computer Representation in Memory

31] Sketch the long int 4 byte] memory representation of  32780 (base 10) and - 32780 (base 10). Draw Small!
 

+32780=
 

1's Complement
 

-32780=
 

32]  Circle the Sign Bit for both 32780 and -32780.

33] Label the High Byte, label  the Low Byte, number all of the bits, and label the sign bit in the sketch of 32780 and -32780.


char - Computer Representation in Memory (1 byte)

Sample ] Consult the ASCII table for the representation of an A. Sketch the memory representation of  the character  'A'

http://members.tripod.com/~plangford/ascii.html

                         bit #      7       6       5       4       3       2       1       0
              ---------------------------------
A =           | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
              ---------------------------------
 

34] Sketch the memory representation of  the character  'a'

                ---------------------------------
a   =           |   |   |   |   |   |   |   |   |
                ---------------------------------
35] Sketch the memory representation of  the character  '0'

                ---------------------------------
0   =           |   |   |   |   |   |   |   |   |
                ---------------------------------
36] Sketch the memory representation of  the character  ' '  (Blank)

                ---------------------------------
    =           |   |   |   |   |   |   |   |   |
                ---------------------------------



37] Those Labs labeled "Individual Assignment" are to be done separately by each individual. Using a pen,  each individual is to print  his/her name at the top of this document in the space provided and sign it.  Those Labs labeled "Team Assignment" may be done as a team or individually. Using a pen,  each individual on the team is to print print his/her name at the top of this document in the space provided and sign it. Submit only one copy of team assignments!

Include the following in your wire-band binder:

A] Divider

B] Copy of this assignment sheet. Using an ink pen, print your name and sign this lab at the top.

C] Using an ink pen, initial each and every page of this lab.