Chapter 1 Data Representation
Chapter 1 Data Representation
Chapter objectives
Learners should be able to
Introduction
Number base conversion refers to the process of changing a number from one numerical
system to another. It involves representing the same value using different base systems such as
decimal (base 10), binary (base 2), octal (base 8), hexadecimal (base 16) or any other base. This
conversion is performed by converting the digit of the number from one base to their
equivalent representation in the desired base
BINARY CONVERSION
Decimal to Binary
To convert decimal number to binary, first divide the decimal by the base noting the reminder
then repeat the process until there is a zero quotient
2 55 R
2 27 1
2 13 1
2 6 1
2 3 0
2 1 1
0 1
Therefore 55 = 1101112
Firstly, weights (powers of 2) are appended from the right to the left of the binary numbers
Power 25 24 23 22 21 20
Value 32 16 8 4 2 1
Binary 1 1 0 1 1 1
number
32 + 16 + 8 + 4 + 2 + 1
Therefore 1101112 = 55
Powers 2 2 2 2 . 2 2 2
Binary number 1 0 1 1 . 0 1 1
(8x1)+(4x0)+(2x1)+(1x1) .(0.5x0)+(0.25x1)+(0.125x1)
2 15 R
2 7 1
2 3 1
2 1 1
0 1
Hence 15 = 11112
Multiple 0.75 x 2 = 1.5, so the value 1 becomes the first digit after the binary point. Repeat the
multiplication of the fractional part until it become 0.
0.75 x2 1.5 1 becomes the first digit after the binary point
0.5 x 2 1.0 1 becomes the second digit after the binary point
15 = 1111
0.75 = 11
Task
OCTAL CONVERSION
8 121 R
8 15 1
8 1 7
0 1
Power 82 81 80
Value 64 8 1
Octal number 3 4 5
(64 x 3) + (8 x 4) + (1 x 5)
192 + 32 + 5
= 229
Octal number 1 2 7 . 3 1
64 + 16 + 7 + 0.375 + 0.015625
8 35 R
8 4 3
8 0 4
Multiple 0.15 x 8 = 1.2, so the value 1 becomes the first digit after the binary point. Repeat the
multiplication of the fractional part until it become 0.
0.15 x 8 1.2 1 becomes the first digit after the binary point
0.2 x 8 1.6 1 becomes the second digit after the binary point
0.6 x 8 4.8 4 becomes the third digit after the binary point
0.8 x 8 6.4 6 becomes the fourth digit after the binary point
0.4 x 8 3.2 3 becomes the fifth digit after the binary point
0.2x 8 1.6 1 becomes the sixth digit after the binary point
0.6 x 8 4.8 4 becomes the seventh digit after the binary point
0.8 x 8 6.4 6 becomes the eighth digit after the binary point
The fractional part becomes 0. 1463146, hence it becomes an infinite fractions with a repeating
pattern on 0.1463146…… digits.
35 = 438
0.15 = 11463
Task
1. Convert the following decimal (denary) to octal
a) 54 b) 459 c) 130. 75
2. Convert octal to decimal (denary)
HEXADECIMAL CONVERSION
16 93 R
16 5 13
0 5
Therefore 93 = 5D16
16 393 R
16 24 9
16 1 8
0 1
Value 256 16 1
Hexadecimal 2 3 F
512 + 48 + 15
16 299 R
16 18 11
16 1 2
16 0 1
Multiple 0.25 x 16 = 4.0, so the value 1 becomes the first digit after the binary point. Repeat the
multiplication of the fractional part until it become 0.
0.25 x 16 4.0 4 becomes the first digit after the binary point
0.25 = 0.4
Task
Octal 0 1 2 3 4 5 6 7
To convert binary number to octal, group the binary digits into groups of three starting from
the right most digit. If the last group to the left is less than three digits add zeros.
Octal 1 6 5
Converting from octal to binary, the groups of three binary digits corresponding to each octal
digit is written.
Octal 4 7 1 3
Hexadecimal 0 1 2 3 4 5 6 7
Hexadecimal 8 9 A B C D E F
Hexadecimal 1 9 F
Hexadecimal 5 E B 7
Binary arithmetic
Addition
1 1 1 1 1 (carry)
1 0 1 1 1 1 1
+ 1 1 0 1 0 1 0
1 1 0 0 1 0 0 1
Subtraction
1 0 0 1
- 0 1 1 0
0 1 1 1
Multiplication
Example 1
1 0 1 1
x 1 0 1
1 0 1 1 0 0
+ 1 0 1 1
1 1 0 1 1 1
Example 2
1 1 0 1 1 . 1
x 1 . 0 1
1 1 0 1 1 1 0 0
+ 1 1 0 1 1 1
1 0 0 0 1 0 . 0 1 1
Division
Example 1
1 0 1 R 1 0 0
1 0 1 1 1 1 0 1
- 1 0 1
1 0 0 1
- 1 0 1
1 0 0
Example 2
1 1 0 1
1 0 1 1 0 . 1 1
1 0
1 0
1 0
0 1 1
1 0
Octal arithmetic
Addition
Example: 528 + 68
5 2
+ 6
6 08
1 (carry)
3 7 18
+ 1 4 58
5 3 68
Subtraction
4 5 78
- 2 6 48
1 7 38
Multiplication
Example : 178 x 28
1 (carry)
1 78
x 28
3 68
Hexadecimal arithmetic
Addition
9 A C16
+ 1 6 F16
B 1 B16
Subtraction
B A 616
_ C 316
A E 316
Multiplication
5 B16
x 3 A16
1 1 1 016
+ D E16
1 1 E E16
Division
4 5 4 R 1
C 5 4 4 9
- 4 8
6 4
- 6 0
4 9
- 4 8
1
Ones complement
In one's complement representation, the range that can be represented is divided into two
parts: positive values and negative values. Let's assume we are working with a 4-bit one's
complement representation for simplicity.
Positive Values: In a 4-bit one's complement representation, positive values are represented
directly without any special encoding. The range of positive values can be calculated using the
formula 2^ (n-1) - 1, where n represents the number of bits. For example, in a 4-bit one's
complement representation, the formula gives us ((2^3) - 1) = 7. Therefore, the positive values
that can be represented in this 4-bit one's complement format range from 0 to +7.
Negative Values: In one's complement representation, negative values are formed by taking the
one's complement of the corresponding positive value and adding a sign bit to the MSB
position. Using our example of a 4-bit representation, the negative values can be calculated
using the formula - ((2^ (n-1)) - 1). For a 4-bit one's complement representation: Negative range
= - ((2^3) - 1) = -7. Therefore, the negative values that can be represented in this 4-bit one's
complement format range from -7 to -1.
One’s complement has some advantages and disadvantages, such as: It is easy to obtain the
one’s complement of a binary number by simply flipping all the bits. It allows subtraction to be
performed by adding the one’s complement of the subtrahend to the minuend. It has two
representations for zero: +0 (00000000) and -0 (11111111), which can cause confusion and
inconsistency.
Addition
6 0 1 1 0
+ 2 + 0 0 1 0
8 1 0 0 0
1 0 0 0 0 0 1 0 1 0
+ -3 1 1 1 1 1 1 0 0
[1] 0 0 0 0 0 1 1 0
7 0 0 0 0 0 1 1 1
NB: The carry out [1] is add back to 00000110 resulting in 00000111, the result is 7 in decimal.
Subtraction
1 1 1
9 1 0 0 1
- 5 + 1 0 1 0
[1 0 0 1 1
]
+ 1
4 0 1 0 0
NB: The carry out [1] is add back to 0011 resulting in 0100 2, the result is 4 in decimal.
Two’s complement
Two’s complement has some advantages and disadvantages, such as: It is easy to obtain the
two’s complement of a binary number by finding the one’s complement and adding 1, or by
starting from the least significant bit and copying all the bits until the first 1, then flipping the
remaining bits. Two’s complement allows subtraction to be performed by adding the two’s
complement of the subtrahend to the minuend, without any end-around carry. It has only one
representation for zero: 00000000, which eliminates the ambiguity and inconsistency of one’s
complement.
In two’s complement representation, addition involves performing binary addition just like in
regular binary arithmetic. The difference lies in how negative numbers are represented. The
most significant bit (MSB) is used indicate the sign of a number
Align the binary numbers, ensuring that they have the same number of bits. If they do
not have, pad zeros to the left of the shorter number.
Start with the right most bits of the numbers and perform regular binary addition. Add
the corresponding bits together include the carry if there is any.
If there is a carry out from the left most bit of the addition it indicates an overflow.
Ignore this carry as it falls of the end.
Note that in two’s complement, a positive number has a 0 MSB, while a negative
number has a 1 MSB. The MSB of the result will carry the sign information.
If the result’s MSB is 1, it means the sum is negative. Convert the result from two’s
complement back to its decimal representation if needed.
7 0 1 1 1
+ 5 0 1 0 1
1 2 1 1 0 0
First convert -6 to 6 bits equivalent (000110) then negate (flip) to 111001 + 1 = 111010
2 1 0 1 0 1 0 1
+ -6 1 1 1 0 1 0
1 5 [1] 0 0 1 1 1 1
Represent the numbers in binary: Convert the numbers to their binary representation if
they are not already in binary form.
Determine the complement of the number being subtracted: To find the complement of
a binary number, invert (flip) all the bits to their opposite values. For example to find the
complement 1101, we change all the 0s to 1s and vice versa, resulting in 0010
Add the complement to the original number: Perform binary addition by adding the
original number and the complement together, just like regular addition.
Ignore any carry out from the most significant bit (leftmost bit), as it is discarded in
two’s complement arithmetic.
Interpret the result: If there is a positive carry out (overflow) after adding, it means the
result is negative otherwise the result is positive or zero, depending on the bits
obtained.
Example
First convert 9 to 4 bits equivalent (1001) then negate (flip) to 0110 + 1 = 0111
1 3 1 1 0 1
- 9 + 0 1 1 1
4 [1] 0 1 0 0
The term floating point refers to the fact that the decimal point (or binary point) of the number
can be placed anywhere relative to the significant digits of the number. This position is
indicated by an exponent, which is another number that specifies how many places the decimal
point should be moved. For example, the number 123 can be also be represented as 1.23 x
10^2 by moving the decimal point two places to the left.
A floating point number consists of three parts: a sign bit, a significant, and an exponent. The
sign bit is a single bit that indicates whether the number is positive or negative. The significant
is a sequence of bits that represents the magnitude or value of the number. The exponent is
another sequence of bits that represents the power of the base (usually 2) that the significant
should be multiplied by.
For example, using 8 bits, the number -5.25 can be represented as 1 0101001 001, where 1 is
the sign bit, 0101001 is the significant, and 001 is the exponent.
There are different formats and standards for floating point arithmetic, depending on the
number of bits used and the rules for rounding, overflow, underflow, and special values. The
most common standard is the IEEE 754 can represent numbers typically ranging from
approximately 1.17549e-38 to 3.40282e+38, which defines several formats for different
precisions and ranges of numbers. For example, the single-precision format uses 32 bits, with 1
bit for the sign, 8 bits for the exponent, and 23 bits for the significant.
It can represent a wide range of numbers, from very large to very small, with a fixed number of
bits. Floating point can perform calculations with real numbers that are not possible or
convenient with integer arithmetic, such as fractions, decimals, roots, powers, logarithms,
trigonometry, etc. It can be used for scientific, engineering and mathematical computation hat
require high accuracy and precision.
Floating point arithmetic limitations
It cannot represent every real number exactly, due to the finite number of bits and the
rounding errors that may occur. For example, the decimal number 0.1 cannot be represented
exactly as a binary fraction, so it is approximated by the nearest binary fraction that can fit in
the available bits. This causes a small error in the representation, which may propagate and
accumulate in subsequent calculations.
It may produce unexpected or incorrect results, due to the limitations of the format and the
standard. For example, some operations may result in overflow, underflow, or NaN (not a
number), which are special values that indicate an invalid or undefined result.
Normalization is a process that is used to convert a floating point number into a standardized
format. The standard format for floating point numbers is known as the IEEE 754 standard. This
standard defines a format for floating point numbers that includes the sign, exponent, and
mantissa. The sign indicates whether the number is positive or negative. The exponent
indicates how many places the decimal point is shifted. The mantissa is the actual value of the
number. By converting a floating point number to the IEEE 754 standard format, we can ensure
that the number is represented accurately.
Advantages of normalisation
There are several advantages to normalizing floating point numbers. First, it helps to prevent
round-off errors, since all numbers are represented in the same standardized format. Second, it
makes it easier to compare numbers, since they are all represented in the same way. Third, it
makes it easier to perform arithmetic operations on numbers, since they are all in the same
format. Finally, it helps to conserve memory, since all numbers are stored in the same format.
Mantissa and exponent are two terms that are used to describe the parts of a number that is
written in scientific notation or floating point representation. Scientific notation and floating
point representation are ways of expressing number that are too large or too small to be
written in the normal decimal form.
Scientific notation is a way of writing numbers using a base (usually 10) and an exponent. The
number is written as a product of a mantissa and a power of the base. The mantissa is a decimal
number between 1 and 10, and the exponent is an integer that indicates how many places the
decimal point should be moved.
For example, the number 5367 can be written in scientific notation as 5.367 x 10^3, where
5.367 is the mantissa and 3 is the exponent.
Identify the mantissa: The mantissa represents the significant digits of the number,
ignoring any leading or trailing zeros. In this case, the mantissa is 5367.
Determine the exponent: the exponent is the power or ten by which the mantissa
should be multiplied or divided to represent the original number. We can find the
exponent by counting the number of places we need to move the decimal point to reach
the original number. In this case, we need to move the decimal point 3 places to the left.
Therefor the exponent is -3.
Normalize the mantissa: To normalise the mantissa, we adjust its value so that it is
between 1 and 10. In this case the mantissa 5.367 is within the range.
Represent the number in scientific notation: Using the mantissa and exponent we can
express the original number in scientific notation. This case the normalise form is
5.367 x 10^3.
The normalised representation of the number 5367 is 5.367 x 10^3.
It is a way of writing numbers using a binary base (2) and an exponent. The number is written as
a product of a sign bit, a significant, and a power of the base. The sign bit is a single bit that
indicates whether the number is positive or negative. The significant is a binary fraction
between 0.5 and 1, and the exponent is an integer that indicates how many places the binary
point should be moved. For example, the number-5.25 can be written in floating point
representation as 1.010101 x 2^2, where 1 is the sign bit, 0.010101 is the significant, and 2 is
the exponent.
The mantissa and the exponent are different ways of representing the magnitude and the scale
of a number. They can help simplify the calculations and the storage of numbers that are very
large or very small.
A fixed point number consists of two parts: a sign bit and a magnitude. The sign bit is a single
bit that indicates whether the number is positive or negative. The magnitude is a sequence of
bits that represents the value or size of the number.
Q format: It is a standard notation for fixed point arithmetic that specifies the number of
integer bits and fractional bits in the magnitude. For example, Q7.8 means that the
magnitude has 7 integer bits and 8 fractional bits, and the sign bit is not counted.
Binary scaling: It is a method of fixed point arithmetic that uses a power of 2 as the
scaling factor. For example, the value 1.23 can be represented as 10011010 with a
scaling factor of 2^-2, meaning that the binary point is 2 places to the left of the least
significant bit.
Decimal scaling: It is a method of fixed point arithmetic that uses a power of 10 as the
scaling factor. For example, the value 1.23 can be represented as 10011010 with a
scaling factor of 10^-2, meaning that the decimal point is 2 places to the left of the least
significant bit.
The advantages of fixed point arithmetic are that they are accurate, has a high precision and are
easy to convert between decimal and binary representation. However their disadvantages are
that they are not as efficient as floating point arithmetic and they can only represent a limited
range of values.
The range of numbers that can be represented in a fixed point system is determined by the
number of bits used to represent the integer part and the fractional part. For example, in a
system with 8 bits, the integer part would be represented using 4 bits, and the fractional part
would be represented using 4 bits. This means that the range of numbers that can be
represented in this system is from -8 to +7, with a precision of 0.5. The range of numbers that
can be represented in a floating point system is determined by the number of bits used to
represent the exponent and the mantissa.
Fixed point fractional binary numbers
In a fixed point fractional binary number system, the maximum positive number is equal to 1
less than the number of bits used to represent the fractional part. For example, in a system
with 4 bits, the maximum positive number would be 3. The minimum positive number is 1 less
than the maximum negative number. This means that in a system with 4 bits, the minimum
positive number would be -2. The range of numbers that can be represented is from -2 to +3,
with a precision of 0.25.
Integer representation
In sign and magnitude representation, a sign bit is used to indicate whether a number is
positive or negative. The sign bit is usually the leftmost bit. If the sign bit is 1, the number is
negative, and if it is 0, the number is positive. The remaining bits are used to represent the
magnitude of the number. For example, in a system with 4 bits, the number 1011 would be
represented as -3. The sign bit (1) indicates that the number is negative, and the remaining 3
bits (011) represent the magnitude of the number (3).
Computer arithmetic errors are errors that occur when a computer performs calculations with
numbers that are not represented exactly in its system. These errors can affect the accuracy
and reliability of the results, and may cause unexpected or undesired outcomes.
Overflow error occur when a number is too large to be represented in the computer's memory,
resulting in an incorrect result. All three types of errors can lead to inaccurate results, which can
cause problems in calculations.
Underflow error occurs when a number is so small that it becomes zero or a very small number
when it is rounded or truncated. For example, if a number is 0.0001 and it is rounded to the
nearest integer, it becomes zero. This can cause problems in calculations, since the actual value
of the number is not zero. Underflow errors can be detected by checking for values that are
very close to zero.
Round-off errors are errors that occur when a number is approximated by a finite number of
digits or bits. For example, the decimal number 0.1 cannot be represented exactly as a binary
fraction, so it is rounded to the nearest binary fraction that can fit in the available bits. This
causes a small error in the representation, which may propagate and accumulate in subsequent
calculations. Rounding errors occur when a number is rounded to the nearest value, resulting in
a loss of precision.
Truncation errors are errors that occur when an infinite or very large process is approximated
by a finite or smaller one. For example, the value of pi cannot be computed exactly by any
algorithm, so it is truncated to a finite number of digits or bits. This causes a small error in the
approximation, which may affect the accuracy of the calculations that use it. Truncation errors
occur when a number is truncated, or cut off, resulting in the loss of a digit.
Actual error, also known as absolute error, is the difference between the computed or
measured value and the true or exact value. It is expressed with the same units as the values.
For example, if the true value of a length is 10 cm and the measured value is 9.8 cm, the actual
error is 0.2 cm. Actual error indicates how much the computed or measured value deviates
from the true value, but it does not take into account the magnitude or scale of the values.
Relative error, also known as fractional error or relative deviation, is the ratio of the actual
error to the true or exact value. It is expressed as a fraction or a percentage. For example, if the
true value of a length is 10 cm and the measured value is 9.8 cm, the relative error is 0.2 / 10 =
0.02 or 2%. Relative error indicates how large the actual error is compare to the true value, but
it does not show the actual amount of error.
Both actual error and relative error are important for assessing the quality and reliability of
numerical methods and calculations. They can help identify the sources and effects of errors,
such as rounding, truncation, measurement, and approximation errors.
Character sets
A character set is a collection of characters that are used to represent text in a computer
system or a document. A character is a minimal unit of text that has a meaning, such as a letter,
a digit, a symbol, or a punctuation mark.
It is a character encoding standard that assigns a numerical value to each character, such as
letters, digits, punctuation marks, and some special symbols. ASCII uses 7 bits to represent each
character, which means it can encode up to 128 different characters. The first 32 characters (0-
31) are control codes that are used to control devices such as printers and terminals. The next
95 characters (32-126) are printable characters that can be displayed on the screen.
ASCII was developed in the early 1960s as a standard way of exchanging information between
computers and electronic devices. It was based on earlier telegraph codes and was designed to
be easy to sort and use.
Some disadvantages of ASCII include its limited character set and the fact that it cannot
represent all languages
It is a way of representing decimal numbers using binary digits. Each decimal digit (0 to 9) is
encoded as a four-bit binary number, and then the binary numbers are concatenated to form
the BCD code.
BCD is different from simple binary representation, where the whole decimal number is
converted into a single binary number by dividing by 2 repeatedly. For example, the decimal
number 42 is encoded as 101010 in simple binary representation. BCD uses more bits to
represent the same decimal number than simple binary representation, but it has some
advantages, such as:
It is easier to convert between BCD and decimal than between simple binary and decimal,
because each digit is encoded separately.
It avoids rounding errors and loss of precision that may occur in floating-point representation,
especially for fractional numbers.
There are different types of BCD, such as packed BCD and unpacked BCD, depending on how
the binary digits are stored and processed. Packed BCD stores two BCD digits in one byte, while
unpacked BCD stores one BCD digit in one byte.
Binary coded decimal (BCD) is a method of representing decimal numbers using binary digits.
Each decimal digit is represented by a 4-bit binary number.
Advantages of BCD
The main advantage of BCD is that it is easy to understand and use, since it is based on the
decimal system. BCD also has a relatively small memory footprint, since it only requires 4 bits
per decimal digit.
Disadvantages of BCD
However, BCD has a few disadvantages as well. One of the main disadvantages of BCD is that it
is less efficient than other methods of representing decimal numbers, such as UNICODE or
floating point numbers. Additionally, BCD does not support negative numbers. Finally, BCD is
not as widely supported as other character sets, such as UNICODE.
Unicode
UNICODE is a 16-bit character set that was developed to replace ASCII. It is designed to support
all of the world's languages, including those that use non-Latin alphabets. It also includes a wide
range of special characters, such as mathematical symbols and emoji.
Some advantages of UNICODE include its large character set and its ability to represent all
languages.
Some disadvantages of UNICODE include its complexity and the fact that it requires more
memory than ASCII.
Unicode is a standard for character encoding that aims to support the text of all the world’s
writing systems. It assigns a unique number, called a code point, to each character, such as
letters, digits, punctuation marks, and symbols.
Unicode has several advantages over other character encoding standards, such as ASCII and
ISO/IEC 8859.
It can represent characters from many languages and scripts in a single document or file.
It can avoid data loss or corruption due to incompatible encodings or conversions.
It can simplify the development and maintenance of software and systems that handle
multilingual text.
It can facilitate the exchange and interoperability of data across different platforms and
applications.
Unicode uses different formats to store and transmit the code points as binary data. These
formats are called Unicode Transformation Formats (UTFs). The most common UTFs are:
UTF-8: It uses one to four bytes to encode each code point. It is compatible with ASCII and
widely used on the Internet and in web development.
UTF-16: It uses two or four bytes to encode each code point. It is commonly used in Windows
and Java environments.
UTF-32: It uses four bytes to encode each code point. Here are some examples of how Unicode
encodes some characters in different UTFs:
Character Code point UTF-8 UTF-16 UTF-32
This is an 8-bit character encoding system developed by IBM in the early 1960s. It was created
as an extension of the Binary Coded Decimal (BCD) encoding that existed at the time. EBCDIC is
primarily used on IBM mainframe and midrange computer operating systems.
EBCDIC was devised as a way to encode characters for use in IBM’s range of mainframe
computers, starting with the System/360 line. It was designed before the widespread adoption
of ASCII (American Standard Code for Information Interchange) and was intended to be an
efficient means of encoding data for storage and processing on IBM systems.
EBCDIC uses eight binary bits to represent each character, allowing it to encode a total of 256
different characters. This includes letters, numbers, punctuation marks, and control characters.
The encoding scheme assigns a unique binary number to each character, which can be
represented as two hexadecimal digits.
One of the key differences between EBCDIC and ASCII is the arrangement and assignment of
binary values to characters. For example, the capital letter ‘A’ is represented as x'C1' in EBCDIC
and x'41' in ASCII. This difference in encoding means that when data is transferred between
systems using different character sets, conversion is necessary to maintain the integrity of the
information.
The collating sequence, or the order in which characters are sorted, differs between EBCDIC
and ASCII. In EBCDIC, the general order from lowest to highest value is space, punctuation,
numbers, uppercase letters, and lowercase letters. In contrast, ASCII’s sequence is space,
punctuation, uppercase letters, lowercase letters, and then numbers. This affects how strings
are sorted and processed in programs.
Summary
Data representation is crucial for ensuring accurate storage, processing and exchange of
information into computer system. It forms the foundation of computer science and enables
the development of efficient algorithms and software applications.Character sets includes
ASCII, Unicode, BCD and EDCDIC. These are different from character encoding, which is a
method of mapping the characters to binary data. Character encoding can affect how the
characters are displayed, stored, and transmitted by computer systems. Some character sets
have only one encoding, while others have multiple encodings.
End of chapter questions
1. What is the result of adding the binary numbers 10101 and 1101?
5. Find the two’s complement of the binary number 01101 and 101001
7. What is the difference between a denormalised and normalised floating point number?
10. Explain the concept of overflow error in computer arithmetic and provide an example.
11. What is underflow error and how does it affect arithmetic operations
Two's complement used for both the mantissa and the exponent