Chapter 5-DATA TYPE AND DATA REPRESENTATIONS
Chapter 5-DATA TYPE AND DATA REPRESENTATIONS
Chapter 5-DATA TYPE AND DATA REPRESENTATIONS
Data type
Integer
An integer is a positive or negative whole number that does not contain a fractional part.
Integers are held in pure binary for processing and storage.
In some programming languages integers can be short and long integers (more bytes are used to store
long integers).
Integers are made up of digits, which are a single place that can hold numerical values between 0 and
9.
Digits are normally combined together in groups to create larger numbers.
For example 6357 has four digits.
Integers are stored by the computer as binary numbers using a whole number of bytes.
It is usual to use either 2 bytes (called short integers) or 4 bytes (called long integers), the difference
being simply that long integers can store larger numbers.
Negative integers can also be stored, these have to be treated as different types of data by the computer
because the Most Significant Bit (MSB) of the data stands for something different than in an ordinary
unsigned integer.
Real
A real is a number that contains a decimal point. Real numbers can also be referred to as single or double,
depending upon the number of bytes in which they are stored.
Boolean
A Boolean is a data-type that can store one of only two values –True or False.
Boolean are stored in one byte – True being stored as 11111111 and False as 00000000.
A simple example of its use would be in the control program for an automatic washing machine.
One of the important pieces of information for the processor would be to know whether the door was
shut.
A Boolean variable could be set to 0 if it was open and to 1 if it was shut.
A simple check of that value would tell the processor whether it was safe to fill the machine with
water
String
A string (or text) is a series of alphanumeric characters usually enclosed in quotation marks.
Any type of alphabetic or numeric data can be stored as a string, e.g: “Mutare”, “07/02/1978”, “123”
and “36.85” are all strings.
Each character within a string will be stored in one byte using its ASCII code.
However modern systems might store each character in two bytes using its Unicode.
The maximum length of a string is limited only by the available memory.
Character
A character is any single digit, letter or symbol that can be represented in a computer, for example, 2, t, G, %,
&, M, space, etc. Each character is represented using binary digits, which the computer can understand;
therefore take up a single unit of storage on the computer. Some programming languages refer to this as a Char.
Can be used to represent coded data e.g. M for Male, F for Female.
Visual Basic uses User Defined Data types (UDTs) as a way of implementing data structures. In C/C++, they are
called Structures (structs) and in Pascal and COBOL they are called records.
UDTs can be declared only at the module-level (form) (you may not declare a UDT in an individual Sub or
Function).
UDTs may have Public (project-level) or Private (module-level) scope. If the keyword Public or Private is
omitted, the default is Public.
UDTs with Public scope may only be defined in standard modules, not forms.
For example, to define a UDT for an employee record, you might code the following:
To use a UDT, you must define a variable "As" the name following the keyword "Typ e" (in this case,
"EmployeeRecord"). For example:
I Bit = 1 or 0
I Nibble = 4 Bits (1/2 a Byte)
I Byte = 8 Bits
I Kilobyte (Kb) = 1024 Bytes = 210 Bytes
1 Megabyte (Mb) = 1024 Kilobytes = 220 Bytes
1 Gigabyte (Gb) = 1024 Megabytes = 230 Bytes
1 Terabyte (Tb) = 1024 Gigabytes = 240 Bytes
1. Bit
Bit is short for BInary digiT. It is a single digit in base 2, that is, either 1 or 0. A bit is the smallest unit of data
that the computer can process. Therefore a binary number is composed of these two values only, that is 1 and
0. Bit represents two states, “ON” or “OFF”, true or false, or yes or no
2. Byte
A byte is a group of 8 bits representing a character. A character is any digit, letter or symbol that can be
represented in a computer, for example, 2, t, G, %, &, M, space, etc. Each character is represented using
binary digits, which the computer can understand, therefore take up a single unit of storage on the
computer. With 8 bits in a byte, you can represent 256 values ranging from 0 to 255:
0 = 00000000
1 = 00000001
2 = 00000010
...
254 = 11111110
255 = 11111111
NB: However, the byte size may differ with the architecture of the computer. Other computers use an 8-bit
byte, other 32-bit byte, others 64-bit byte. Thus in general, a byte can be a unit representation of character,
which could be 8, 16, 32 or in 64 bits. However, for this course, we will assume a bit as a group of 8-bits
representing a character.
3. Word
A word is a fixed-size group of bits that can be handled as a unit by the processor.
Word size refers to the number of bits that the CPU can simultaneously process, which could be 8 bits,
16 bits, 32 bits or 64 bits. The bits are processed as a unit during input and output. A 64 bit processor can
process data faster than a 32 bit processor, thus word size affects processor speed.
In the ASCII character set, each binary value between 0 and 127 is given a specific character. Most computers
extend the ASCII character set to use the full range of 256 characters available in a byte. The upper 128
characters handle special things like accented characters from common foreign languages.
You can see the 127 standard ASCII codes below. Computers store text documents, both on disk and in
memory, using these codes. For example, if you use Notepad in Windows OS to create a text file containing
the words, "Four score and seven years ago," Notepad would use 1 byte of memory per character (including 1
byte for each space character between the words -- ASCII character 32). When Notepad stores the sentence in
a file on disk, the file will also contain 1 byte per character and per space.
Try this: Open up a new file in Notepad and insert the sentence, "Four score and seven years ago" in it. Save
the file to disk under the name getty.txt. Then use the explorer and look at the size of the file. You will find
that the file has a size of 30 bytes on disk: 1 byte for each character. If you add another word to the end of the
sentence and re-save it, the file size will jump to the appropriate number of bytes. Each character consumes a
byte.
If you were to look at the file as a computer looks at it, you would find that each byte contains not a letter but a
number -- the number is the ASCII code corresponding to the character (see below). So on disk, the numbers
for the file look like this:
F o u r a n d s e v e n
70 111 117 114 32 97 110 100 32 115 101 118 101 110
By looking in the ASCII table, you can see a one-to-one correspondence between each character and the
ASCII code used. Note the use of 32 for a space -- 32 is the ASCII code for a space. We could expand these
decimal numbers out to binary numbers (so 32 = 00100000) if we wanted to be technically correct -- that is
how the computer really deals with things.
The first 32 values (0 through 31) are codes for things like carriage return and line feed. The space character is
the 33rd value, followed by punctuation, digits, uppercase characters and lowercase characters.
ASCII codes can just be used for representing characters and not for arithmetic calculations.
ASCII codes also occupy a lot of disc storage space.
2. Binary System
Data is represented in 0s and 1s, thus in base 2. It is obtained by dividing the denary number by 2, taking
the remainders only. The number of bits in the answer does not matter unless specified.
BCD is used to represent some numbers that are not proper numbers (numbers that don’t behave like
numbers). A barcode looks like a number, but if the barcodes are added together the result is not a barcode for
any product. The arithmetic does not give a sensible answer. Values like this that look like numbers but do not
behave like them are often stored in binary coded decimal (BCD). Each digit is simply changed into a four bit
binary number which are then placed after one another in order.
- This has the advantage that it is easy to convert a number from BCD to decimal form and vice versa.
- There is no rounding off numbers when computing fractional numbers, thus no errors due to rounding
off.
- Used in businesses where significant digit needs to be retained.
However:
- As compared to pure binary, more bits are needed to store a number, thus more memory is needed
- Calculations with such numbers are more complex than in pure binary numbers, e.g.
Adding 1 and 19, i.e 0000 00012
+ 0001 10012
0001 10102, the first digit, 1 is wrong and 1010 does not exist in BCD.
The error is caused by the range of numbers used for representing data in BCD. BCD used 4 bits which is 24 =
16 combinations. However the maximum range of numbers represented 9. 6 has to be added to the result if the
sum of bit is greater than 9. Thus adding the result above, 0001 10102 to 6 (0110) gives us 0010 00002, which
is 20 in BCD.
4. EBCDIC
The Extended Binary Coded Decimal Interchange Code (EBCDIC) uses 8 bits (4 bits for zone, 4 bits for digit)
to represent a symbol in the data.
• EBCDIC allows 28 = 256 combinations of bits.
• 256 unique symbols are represented using EBCDIC code. It represents decimal numbers (0-9), lower
case letters (a-z), uppercase letters (A-Z), Special characters, and Control characters (printable and
non-printable e.g. for cursor movement, printer vertical spacing etc.).
• EBCDIC codes are used, mainly, in the mainframe computers.
5. UNICODE
Unicode is a universal character encoding standard for the representation of text which includes letters,
numbers and symbols in multi-lingual environments. This is an international 16-bit data coding method which
represents 65536 different characters. It is enough to represent characters in any language, even Chinese and
hieroglyphics.
A problem arises when the computer retrieves a piece of data from its memory. Imagine that the data is
01000001. Is this the number 65, or is it A?
They are both stored in the same way, so how can it tell the difference?
The answer is that characters and numbers are stored in different memory locations so it knows which
one it is by knowing whereabouts it was stored.
A binary number may be positive or negative. In daily life we use symbols “+” and “-” to represent positive
and negative numbers, respectively. However, binary numbers use 0 (for positive) and 1 (for negative) in the
computer. An n-bit signed binary number consists of two parts – sign bit and magnitude. The left most bit
(Most Significant Bit (MSB)) is the sign bit. The remaining n-1 bits denote the magnitude of the number,
giving us a sign and magnitude as given below.
In an n-bit unsigned binary number, the magnitude of the number n is stored in n bits. An 8-bit unsigned
number can represent data in the range 0 to 255 (28= 256).
1’s Complement
One’s complement of a binary number is obtained by simply converting 1s to 0s and 0s to 1s. For example,
given the following four-bit binary number 10102, its 1’s complement becomes 01012. The alternating of bits
only applies to negative numbers, positive numbers do not change. For example
+6 = 000001102
-6 = 111110012
-6 is the complement (negative) of +6. Just convert 1s to 0s and 0s to 1s and thus -6 in 1’s complement.
Given the 1's complement we can find the magnitude of the number by taking it's 1's complement. The range
of numbers that can be represented in 1’s complement is found by the formula:
-(2n-1-1) to +(2n-1-1)
If the binary number has 8-bits (n=8). Thus the range of numbers will be from (-127) 100000002 to 011111112
(127)
Therefore the largest number that can be represented in 8-bit 1's complement is = 127. The smallest is -127.
However 1’s complement has a problem that it has two different representations (values) for zero, which are
000000002 and 111111112 both represent zero.
When adding binary numbers using 1’s complement, the carry bit is added back to the sum in the rightmost
position. There is no overflow as long as the magnitude of the result is not greater than 2n-1-1. We do not
throw away the carry bit.
2’S COMPLEMENT
Two’s complement of number is obtained by:
a) Positive numbers remain the same
b) Negative numbers: - Change the number to its 1’s complement.
- Add 1 to the result and the number will be in 2’s complement.
11111011
Step-1 00000100
Complement the number.
Step-2 -00000101
Add one add prefix a minus sign.
Step-3 -5
Convert binary to decimal.
When the addition of two values results in a carry, the carry bit is ignored and is thrown away. There is no
overflow as long as the magnitude is not greater than 2n-1-1 nor less than –(2n-1).
The two's-complement system has the advantage that the fundamental arithmetic operations of addition,
subtraction, and multiplication are identical to those for unsigned binary numbers (as long as the inputs are
represented in the same number of bits and any overflow beyond those bits is discarded from the result). This
property makes the system both simpler to implement and capable of easily handling higher precision
arithmetic. Also, zero has only a single representation, other than in ones'-complement where it has two
values.
Binary arithmetic
The arithmetic operations - addition, subtraction, multiplication and division, performed on the binary
numbers is called binary arithmetic. The basic arithmetic operations performed on the binary numbers are
Binary conversion
Binary Addition, and
Binary Subtraction,
Binary Conversion
This involves converting a number in binary from to either denary (base 10), octal (base 8) or hexadecimal(
base 16)
(a) Conversion from decimal (denary) to Binary
Divide the denary number by 2, listing the remainders until the answer is 0 remainder 1.
Take the remainders only from the last one until the first.
For example:
Add all the equivalent to values in the table, whose binary digit correspond to 1 and add them. The
result is the denary equivalent.
That is 16 + 4 = 20. This is a short form of (16 x 1) + (4 x1) = 20
= 1168
= (64 x 1) + (8 x 1) + (1 x 6) = 78
As on binary, take the number, divide it by 16 and take the remainders only, e.g.
Compiled By Kapondeni T. Page 9 | 25
209 to hexadecimal will be expressed as:
NB: Pupils should be able to add and subtract hexadecimal numbers, which were left out in this module.
Cognisance should be taken on carry if the answer after adding exceeds 16. Bear in mind also that the decimal
number 10, 11…15 and represented by letters A, B…F respectively.
In the octal number system there are only eight different symbols.
Step-1
Divide the binary number into groups of three digits starting at 111 101
the LSB.
Step-2
7 5
Write down the hexadecimal equivalent for each group of digits.
111 1012 = 758
QNS
Express the denary number 78 as:
(i) a binary number stored in an 8 bit byte,
-Divide 78 by 2 and then take the remainders, to get 1001110. This answer has 7 bits but you are
required to give your answer in 8-bit. Add a 0 to the leftmost side of the block to produce 010011102
which is the correct answer.
Explain how the binary value of 78 can be used to write down the equivalent octal value with a
minimum amount of calculation [3]
- The binary value of 78 is 01001110.
- Put this binary number in groups of 3 starting from the right, and this gives us 001 001 110.
- Each group of 3 bit can be converted separately to denary or octal form
Convert -63 and -94 into 2’s complement, 8 bit, binary numbers.
- Convert the first number into its binary form by dividing it by 2 and take the remainders.
- If answer does not have 8 bits, add 0s to the left until the bits add up to 8.
- Convert it to one’s complement by converting 1s to 0s and vice versa.
- Add 1 to the result and the number will be in 2’s complement.
- Perform the above stages for the second number.
The results will be as follows:
-63 in to binary form give 111111, which has 6 bits instead of 8. A leading 0 is added to the left to
make them 8, thus giving us: 00111111. Change 0s to 1s and 1s to 0s, which gives us 11000000.
Add 1 to the number and will give us 11000001. Which is now in 2’s complement of 64 which is -
63.
The result above indicates overflow as the result of adding two negative numbers cannot give a positive
answer. There was overflow from positive bits into negative bits. The processor will produce an error because
carry in to MSB is different from carry out.
The decimal point in an integer is implied and does not change its position. The register used to store an
integer value will be as follows:
* * * * * * * *
There is no memory space for the decimal point. However computers represent a finite number of digits. This
limitation allows us to evaluate the maximum and minimum possible numbers that can be represented. These
include:
This is 1.0000000 = -1
The decimal point is fixed at one position and therefore does not move. In binary we can have functional
column headings.
27 26 25 24 23 22 21 20 2-1 2-2
128 64 32 16 8 4 2 1 0.5 0.25
1 0 1 0 0 1 0 0 . 1 1
=164.75
Binary Fraction Fraction Decimal
0.1 1/2 0.5
0.01 1/4 0.25
0.001 1/8 0.125
0.0001 1/16 0.0625
For negative numbers we use two's complement representation on the entire bit pattern.
Example
Represent -5.2510 in 8-bit binary with the binary point after the fourth digit.
The floating point number representation uses two registers. The first register stores the number without the
binary point. The second register stores a number that indicates the position of the binary point in the first
register.
In decimal notation the number 23.456 can be written as 0.23456 x 102. This means that we need only store, in
decimal notation, the numbers 0.23456 and 2. The number 0.23456 is called the mantissa and the number 2 is
called the exponent. This is what happens in binary.
Similarly, in decimal, 0.0000246 can be written 0.246 x 10-4. Now the mantissa is 0.246 and the exponent is –
4.
The floating point representation of a number has two parts: mantissa and exponent. The mantissa is a signed
fixed point number. The exponent shows the position of the binary point in the mantissa. For example, the
binary number +11001.11 with an 8-bit mantissa and 6-bit exponent is represented as follows -
• Mantissa is 01100111. The left most 0 indicates that the number is positive.
• Exponent is 000101. This is the binary equivalent of decimal number +5.
• The floating point number is Mantissa x 2exponent , i.e. + (.1100111) x 2+5.
Example: consider the binary number 10111. This could be represented by 0.10111 x 25 or 0.10111 x 2101.
Here 0.10111 is the mantissa and 101 is the exponent.
Thus, in binary, 0.00010101 can be written as 0.10101 x 2-11 and 0.10101 is the mantissa and –11 is the
exponent.
It is now clear that we need to be able to store two numbers, the mantissa and the exponent. This form of
representation is called floating point form. Numbers that involve a fractional part, like 2.46710 and 101.01012
are called real numbers.
Normalisation
This is done to simplify operations and expressing numbers in standard form.
Normalisation Principles:
Let us look at the following diagram
- For a positive number, there must be NO leading 0s to the left of the MSB, excluding the sign bit.
With positive numbers, the binary point in the mantissa was always placed immediately before the
first non-zero digit because it allows us to use the maximum number of digits.
Suppose we use 8 bits to hold the mantissa and 8 bits to hold the exponent. The binary number 10.11011
becomes 0.1011011 x 210 and can be held as
The first digit of the mantissa is zero and the second is one. The mantissa is said to be normalised if the first
two digits are different. Thus, for a positive number, the first digit is always zero and the second is always one.
The exponent is always an integer and is held in two's complement form.
Care needs to be taken when normalising negative numbers. The easiest way to normalise negative numbers is
to first normalise the positive version of the number. Consider the binary number –1011. The positive version
is 1011 = 0.1011 x 2100 and can be represented by
As another example, change the decimal fraction –11/32 into a normalised floating point binary number.
Leave the negative sign first and solve it for just 11/32, 11/32 = 1/4 + 1/16 + 1/32 = 0.01 + 0.0001 + 0.00001 =
0.01011; converted to binary equivalent.
Now we have 8 bits mantissa and 8 bits exponent, 00101100 00000000,
It is not normalized so normalize it by removing a 0 from location worth 1/2 in mantissa and subtracting that 1
location from exponent 0 reveals -1. That is, 01011000 11111111; this is Floating Point equivalent of 11/32.
For -11/32 keep the exponent same and in mantissa start from right side. Keep all digits same until first 1 and
toggle rest.
Benefits of Normalisation
- Ensures that a single representation of a number is maintained (standardisation).
- Ensures maximum possible accuracy with a given number of bit is maintained.
- Can be used to detect error conditions such as underflow and overflow
- Tires to maximise the range of numbers that can be represented in a fixed point representation (Range
and accuracy is limited in fixed point representation)
● The size of the exponent determines the range of numbers that can be represented
The range of numbers is expanded by increasing the number of bits that are used to represent the
exponent. This will however decrease precision.
Compiled By Kapondeni T. Page 19 | 25
Reducing the number of bits in the exponent will reduce the range because power of two which the
mantissa is multiplying by is decreased.
At the same time decreasing the exponent’s bits will increase accuracy because more digits are
represented after the binary point.
● The size of the significant determines the precision of the numbers that can be represented
Precision can be increased by increasing the number of bits that are used to represent the significant
This will decrease the range.
● The only way to increase both range and precision is to use more bits
that is, the use of single-precision numbers, double-precision numbers, etc
If we use more bits for the mantissa we will have to use fewer bits for the exponent. Let us start off by using 8
bits for the mantissa and 8 bits for the exponent for explanations below:
The largest positive value we can have for the mantissa is 0.1111111 and
The largest positive number we can have for the exponent is 01111111.
This means that we have 0.1111111 x 21111111 = 0.1111111 x 2127.
This means that the largest positive number is almost 1 x 2127.
Also:
The smallest positive mantissa is 0.1000000 and
the smallest exponent is 10000000.
This represents 0.1000000 x 210000000 = 0.1000000 x 2-128 which is very close to zero; in fact it is 2-129.
Compiled By Kapondeni T. Page 20 | 25
On the other hand:
The largest negative number (i.e. the negative number closest to zero) is 1.0111111 x 2 10000000 = -
0.1000001 x 2-128
We cannot use 1.1111111 for the mantissa because it is not normalised. The first two digits must be
different.
Furthermore:
The smallest negative number (i.e. the negative number furthest from zero) is 1.0000000 x 2 01111111 = -
1.0000000 x 2127 = -2127.
Zero cannot be represented in normalised form. This is because 0.0000000 is not normalised because the first
two digits are the same. A normalised value must have the first two bits of the mantissa different. Therefore
one of them must be a 1 which must represent either -1 or + ½, but not zero. Usually, the computer uses the
smallest positive number to represent zero.
Also, size of number mean the furthest to the left on a number line so -1 is a bigger number than -2. Whereas,
if we talk about largest magnitude negative number then the -2 is greater magnitude than -1 because the
integer value is greater (not considering the sign).
Floating and fixed point numbers will be accurate to the smallest number they can represent.
Round-Off Errors
Often we cannot represent a denary fraction exactly even if we allow many bits in memory. Therefore the
number stored is "rounded off" to the closest possible binary equivalent.
In rounding, the least significant bit may be increased depending on digits removed. The result should
represent the value that is nearest to the original value, e.g
100.1 = 100 (2 s. f)
10101 = 1100 (2 .f)
11011 = 11000 (2 s.f)
11.101 = 100 (2 s.f)
Often, in either floating or fixed point systems, results are calculated with too many places of accuracy to be
represented. We get this type of error when trailing bits are truncated to fit the result in the memory location
available.
100.1 = 100 (2 s. f)
10101 = 10000 (2 .f)
11011 = 11000 (2 s.f)
11.101 = 11 (2 s.f)
Overflow
Underflow
An underflow is produced when a result that is smaller in magnitude than the smallest number that can
be represented.
It occurs when a small number is divided by a large number or
When small numbers are multiplied together.
There exists the largest and smallest positive value. Around 0, there exists a range of values that
cannot be represented (stored) and this is underflow.
NB: Overflow and underflow occur when a result of calculations falls outside the range of values
permitted by the representation of the number.
4. (a) Add together the binary equivalents of 34 and 83, using single byte arithmetic, showing you working. (3)
(b). Describe a floating point representation for real numbers using two bytes. (4)
5. a) Explain how the fraction part of a real number can be normalised. (2)
b) State the benefit obtained by storing real numbers using normalised form. (1)
6. a) A floating point number is represented in a certain computer system in a single 8 bit byte. 5 bits are used
for the mantissa and 3 bits for the exponent. Both are stored in two’s complement form and the mantissa is
normalised.
(i) State the smallest positive value,
(ii) state the most negative value
that can be stored. Give each answer as an 8 bit binary value and as a decimal equivalent. (4)
b) Explain the relationship between accuracy and range when storing floating point representations of real
numbers. (4)
7. (a) Express the denary number -95 as a two’s complement integer in an eight-bit byte. [2]
(b) Add together the following binary numbers. Show your working.
0 1 1 0 0 1 1 0 and 0 0 1 0 0 1 0 1 [2]
8. Part of the information stored in the data dictionary describes the type of data which is being stored.
A particular piece of data is 10010110.
State what the data stands for if the data dictionary describes it as:
(i) a two's complement binary number; [1]
(ii) a sign and magnitude binary number; [1]
(iii) a binary coded decimal number. [2]
9. Floating-point numbers in a particular computer system are stored using 12 bits. The first 6 bits are used for
the storage of the mantissa and the second set of 6 bits is used to store the exponent.
(a) One way to represent 6.5 as a floating-point number in this representation is 001101000100
Explain why this representation is equivalent to 6.5 [4]
(b) (i) Using the representation above to help you, write the number 6.5 as a floating-point number in
normalised form. [2]
(ii) Explain the effects of changing the representation so that 8 bits are used for the mantissa and 4 bits for the
exponent. [2]
(c) The numbers 011011001101 and 101100001110 are stored with 6 bits for the mantissa and 6 for the
exponent.
Add the exponents of the two floating-point numbers together. [2]
12. (a) Show how the denary number –90 can be represented, using 8 bits, in:
(i) sign and magnitude,
(ii) two’s complement. [2]
(b) The denary number 10¾ is to be represented as a floating point binary number using 12 bits.
The first 8 bits are to be used for the mantissa and the remaining four bits are to be used for the exponent.
(i) Explain what is meant by the mantissa of a floating point number. [2]
(ii) Explain what is meant by the exponent of a floating point number. [2]
(iii) Show why 001010110101 is a floating point representation of 10¾.[3]
(iv) Normalise the floating point value given in (iii). [2]
13. (a) (i) Express the number 93 as an 8 bit binary number. [2]
(iii) Express the number 93 as a number in hexadecimal. [2]
(b) (ii) Describe the connection between binary representation and hexadecimal. [2]
14. A computer stores fractional numbers in floating point binary representation. Five bits are used for the
mantissa and three bits for the exponent. All values are stored in two’s complement form.
(a) By using a diagram of this representation, state the value of each of the bits. [4]
(b) By using 2 ½ as an example, explain how real numbers can be shown in normalised form in this
representation. [3]
(c) State the floating point binary value of - ¾ in this representation. [2]
15. A computer stores numbers in floating point form, using 8 bits for the mantissa and 8 bits for the exponent.
Both the mantissa and the exponent are stored in two’s complement form.
(a) Explain the effect on the
• range
• accuracy
of the numbers that can be stored if the number of bits in the exponent is reduced. [4]
(b) Give the denary number which would have 01000000 00000000 as its binary, floating point representation
in this computer. [2]
(c) Explain why it is not possible to represent zero as a normalised floating point number. [2]