Difference between revisions of "CSC231 Exercises Binary Hexadecimal"

From dftwiki3
Jump to: navigation, search
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
Exercises: Binary to hexadecimal and decimal
+
=Exercises on number conversion=
  
 
        
 
        
# Convert the following numbers to their (unsigned) decimal and hexadecimal equivalent. For each one indicate the amount of storage required to store them (nybble, byte, word, double-word):
+
==Binary to decimal and hexadecimal==
 +
 
 +
Convert the following binary numbers to their (unsigned) decimal and hexadecimal equivalent. For each one indicate the amount of storage required to store them (nybble, byte, word, double-word):
 +
 
 
         0
 
         0
 
   
 
   
 
         1111
 
         1111
 +
 +
        1000 0000
 
   
 
   
 
         0000 1110 0001 1101 0000 0000
 
         0000 1110 0001 1101 0000 0000
# Hex to binary and decimal
+
 
:Same question for these numbers:
+
==Base 3==
         0
+
 
 +
Count in base 3.  List the first 10 numbers.
 +
 
 +
==Hex to binary and decimal==
 +
Same question for these numbers:
 +
          
 +
        1a
 
   
 
   
 
         1234
 
         1234
Line 17: Line 28:
 
   
 
   
 
         ffff
 
         ffff
# Decimal to binary and hex
 
:Same question for these numbers:
 
  
 +
== Decimal to binary and hex==
 +
Same question for these numbers:
 +
 +
         
 +
          15
 +
 
 
           129
 
           129
 
          15
 
 
   
 
   
 
           32767
 
           32767
 +
 +
 +
<!--
 +
==Converter==
 +
* [http://www.willamette.edu/~gorr/classes/cs130/lectures/BinaryConversion/convert.html Bin/Dec/Hex converter]
 +
-->
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
[[Category:CSC231]]

Latest revision as of 08:21, 23 September 2015

Exercises on number conversion

Binary to decimal and hexadecimal

Convert the following binary numbers to their (unsigned) decimal and hexadecimal equivalent. For each one indicate the amount of storage required to store them (nybble, byte, word, double-word):

        0

        1111
        1000 0000

        0000 1110 0001 1101 0000 0000

Base 3

Count in base 3. List the first 10 numbers.

Hex to binary and decimal

Same question for these numbers:

        1a

        1234

        1010

        ffff

Decimal to binary and hex

Same question for these numbers:


         15
  
         129

         32767