← COMP1310 course page Lectures 2.1 and 2.2

Numbering Systems: a companion

COMP1310 Introduction to Computers and Computing Ethics · First Semester 2026/27

This page goes with the two lectures on numbering systems. Read it with a pen and paper next to you. The sections build on each other, so read them in order the first time. There are four small tools to play with, and the practice questions at the end have their answers hidden until you open them.

1Why two symbols

Inside your phone's processor there are billions of tiny electronic switches (transistors). Each one either lets current through or it doesn't. You could try to build a switch that holds ten different voltage levels, one for each decimal digit, but telling ten levels apart reliably, billions of times a second, with heat and electrical noise around, is hard. Telling "on" from "off" is easy. So computers store everything using two symbols: 1 for on, 0 for off.

That leaves a real problem. How do you write 22, or 297, or −75, or 26.75, using only 0 and 1? You already know the method: you use it every day, with ten symbols. Once you see what our ordinary decimal system is actually doing, binary turns out to be the same idea with fewer symbols.

2What 754 really means

The 7 in 754 does not mean seven. It means seven hundreds, because of where it sits. Every position has a place value (القيمة المكانية), and in decimal (النظام العشري) the place values are powers of 10:

754 = 7×100 + 5×10 + 4×1 = 7×10² + 5×10¹ + 4×10⁰

Where do the place values come from? Think of the distance counter (odometer) in a car. The right-hand wheel shows 0, 1, 2, … 9. There is no symbol after 9, so the wheel rolls back to 0 and pushes the next wheel on by one: 09 becomes 10. That push is the carry. The second wheel moves once every 10 steps, so it counts tens. The third moves once every 10×10 = 100 steps, so it counts hundreds. Each place is worth 10 times the place to its right.

The number 10 is the base (الأساس) of the system, and it does three jobs at once:

Change the base and everything else follows. When more than one base is around, write the base as a small number after the brackets: (754)10, (10110)2. The slides also use a programmer's shorthand: a letter after the number, 10110b for binary and 27h for hexadecimal.

3Counting in binary

Now give every wheel of the odometer only two symbols, 0 and 1. A wheel rolls over after every 2 steps instead of 10. Count from zero and watch the binary (النظام الثنائي) column. Ignore the Octal and Hex columns for now; they will make sense a few paragraphs down, when we meet bases 8 and 16.

DecimalBinaryOctalHex
0000
1111
21022
31133
410044
510155
611066
711177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F
16100002010

The highlighted rows are where binary gets a new wheel: at 2, 4, 8, 16. Each wheel moves half as often as the one on its right, so the binary place values are powers of 2:

place: 2⁷ 2⁶ 2⁵ 2⁴ 2³ 2² 2¹ 2⁰ value: 128 64 32 16 8 4 2 1

Each binary digit is called a bit (short for binary digit). Bits come in named groups: 4 bits make a nibble, 8 bits make a byte, and in this course 2 bytes (16 bits) make a word. (How big a "word" is really depends on the machine; we use the lecture's definition.) So 1010 0011 is 8 bits, 2 nibbles, 1 byte.

How many values fit in n bits?

One bit has 2 patterns: 0 and 1. Add a second bit and you can put a 0 or a 1 in front of each of those, so you get 4. Every extra bit doubles the count:

1 bit: 2 2 bits: 4 3 bits: 8 4 bits: 16 8 bits: 256 n bits: 2ⁿ patterns, from 0 up to 2ⁿ − 1

A byte can hold 28 = 256 different patterns, so as a plain (unsigned) number it runs from 0 to 255. The largest is 28 − 1 for the same reason the largest 3-digit decimal number is 999 = 103 − 1.

Other bases work the same way

Nothing here is special to 2 or 10. Base 8, octal (النظام الثماني), uses the digits 0 to 7 and carries at 8 (look at the octal column above: 7, then 10). Base 5 uses 0 to 4, base 7 uses 0 to 6, base 3 uses 0, 1, 2. A base-b system always has exactly b digits, from 0 to b−1. So (35)7 is a real number, but (37)7 is not: there is no digit 7 in base 7.

Base 16, hexadecimal or "hex" (النظام السداسي عشر), needs sixteen digits, and we only have ten numerals. So after 9 it borrows letters: A=10, B=11, C=12, D=13, E=14, F=15. In hex, F + 1 rolls over to 10, which is sixteen.

Try it: the bit board

Tap a bit to switch it on or off. Switch on one bit at a time and read its place value. Switch all eight on to see 255. Then press +1 and watch every wheel roll over. Ignore the "signed" box for now; it comes back in section 9.

Unsigned decimal0
Hex00
Octal0
Signed (two's complement)0

4Any base to decimal

You already have everything you need. Each digit means digit × place value, so to find the value of a number in any base, write out those products and add them. The place values are powers of the base, counted from 0 at the right.

(10110)2 = 1×16 + 0×8 + 1×4 + 1×2 + 0×1 = 22 (47)8 = 4×8 + 7×1 = 32 + 7 = 39 (27)16 = 2×16 + 7×1 = 32 + 7 = 39 (DE1)16 = D×16² + E×16 + 1×1 = 13×256 + 14×16 + 1 = 3328 + 224 + 1 = 3553 (D = 13, E = 14)

Look at the middle two. (47)8 and (27)16 are the same number, 39. The digits alone don't tell you the value; you also need the base. That is why we write the subscript.

For binary there is a quicker way: each digit is 0 or 1, so just add up the place values that sit under a 1. For 10110 that is 16 + 4 + 2 = 22.

5Decimal to any base

Going the other way, you have a value and need to find its digits. The method: divide by the base and write down the remainder (باقي القسمة). Divide the quotient by the base again, and keep going until the quotient is 0. Then read the remainders from the bottom up.

DivideQuotientRemainder
22 ÷ 2110
11 ÷ 251
5 ÷ 221
2 ÷ 210
1 ÷ 201 ↑

Reading up: (22)10 = (10110)2, which matches section 4.

Why bottom-up? Check it on a number you know

Do the same thing to 754 with base 10. 754 ÷ 10 gives quotient 75, remainder 4. The remainder is the last digit, and the quotient is the number with that digit chopped off. Next, 75 ÷ 10 gives 7 remainder 5. Then 7 ÷ 10 gives 0 remainder 7. The remainders came out 4, 5, 7: the digits of 754, last digit first.

That is all repeated division does, in any base. Dividing by the base splits off the rightmost digit as the remainder and shifts everything else one place to the right. Dividing 22 by 2 gives remainder 0, which is the last bit of 10110, and quotient 11, which is 1011. Because the digits come out right-to-left, you read the column upwards.

Two more worked out. Remainders can be anything from 0 to base−1, so in hex a remainder of 10 to 15 is written A to F.

39 to octal: 39 ÷ 8 = 4 r 7 4 ÷ 8 = 0 r 4 → (47)8 39 to hex: 39 ÷ 16 = 2 r 7 2 ÷ 16 = 0 r 2 → (27)16 220 to binary: remainders 0,0,1,1,1,0,1,1 (top to bottom) → (11011100)2

Always check by converting back with section 4: 128 + 64 + 16 + 8 + 4 = 220.

Try it: step-by-step converter

Type a number, choose the base, and the tool shows every step. Do one by hand first and use this to check.

6Octal and hex: binary in short

To convert binary to octal you could go through decimal, but there is a much shorter route, and it is the reason octal and hex are used in computing at all.

Here is why it works, on one number. Take 1011102 = 32 + 8 + 4 + 2 = 46, and split it into 101 | 110. The left three bits are worth 32, 16, 8, which is 8 × (4, 2, 1), so they count eights: 101 = 5 eights. The right three bits count ones: 110 = 6. So 46 = 5×8 + 6 = (56)8. Because 8 = 23, each octal digit is exactly 3 bits. In the same way 16 = 24, so each hex digit is exactly 4 bits.

The rule: starting from the right (or from the binary point, if there is one), cut the bits into groups of 3 for octal or 4 for hex. If the last group on the left is short, pad it with zeros. Then replace each group with its digit.

100 101 010 → 4 5 2 (452)8 1001 0101 → 9 5 (95)16 1110 0011 → E 3 (E3)16 1 0110 1011 = 0001 0110 1011 → 1 6 B (16B)16

You only need the 16 patterns below, and the first 8 patterns, 0 to 7 (dropping the leading 0), are the octal table too.

Hex01234567
Bits00000001001000110100010101100111
Hex89ABCDEF
Bits10001001101010111100110111101111

This is why programmers like hex. A byte is exactly two hex digits, 00 to FF, so a long string of bits becomes short and readable without losing anything. 1101 0001 is hard to read aloud; D1 is not. You will see memory written this way in section 11.

Between two bases that are not decimal

If both bases are powers of 2 (2, 4, 8, 16), go through binary: expand each digit into bits, then regroup.

(72E)16 = 0111 0010 1110 = 011 100 101 110 = (3456)8

Base 4 = 22, so each base-4 digit is 2 bits. If one of the bases is not a power of 2, such as 7, go through decimal: (35)7 = 3×7 + 5 = 26 = (32)8.

Try it: grouping view

Type a number in binary, octal or hex (a point is allowed, e.g. 11010.11). The grey zeros are padding added to complete a group.

7Fractions

Place values carry on past the point. In decimal, the places after the point are tenths, hundredths, and so on: 0.25 = 2×10−1 + 5×10−2. In binary they are halves, quarters, eighths:

2⁻¹ = 0.5 2⁻² = 0.25 2⁻³ = 0.125 2⁻⁴ = 0.0625 (1011.011)2 = 8 + 2 + 1 + 0.25 + 0.125 = 11.375

Decimal fraction to binary: multiply by 2

Convert the whole part and the fraction part separately. The whole part uses division, as before (11 = 1011). For the fraction part: multiply it by 2. The whole-number part of the answer (0 or 1) is the next bit. Keep only the fraction and repeat until it becomes 0. Read the bits top-down.

MultiplyResultBit
0.375 × 20.750 ↓
0.75 × 21.51
0.5 × 21.01

So 0.375 = (0.011)2 and 11.375 = (1011.011)2.

Why it works. Multiplying by 10 moves a decimal point one place right: 0.375 × 10 = 3.75, and the first digit after the point has jumped across it. Multiplying by 2 does the same thing to a binary point. 0.375 is 0.011 in binary. Doubling it gives 0.75, which is 0.11: the first bit after the point, a 0, has crossed over and become the whole part. Doubling 0.75 gives 1.5, which is 1.1: the next bit, a 1, has crossed over. Each time you write down the bit that crossed, throw it away, and double again. The bits come out first-to-last, which is why this time you read downwards.

Same method for 26.75: 26 = 11010, and 0.75 × 2 = 1.5 (bit 1), 0.5 × 2 = 1.0 (bit 1). So 26.75 = (11010.11)2. Keep this one; we store it in memory in section 12.

Some fractions never end

Try 0.2:

MultiplyResultBit
0.2 × 20.40
0.4 × 20.80
0.8 × 21.61
0.6 × 21.21
0.2 × 20.40  (back to the start)

We are back at 0.2, so the same four bits repeat forever: 0.2 = (0.0011 0011 0011…)2. Likewise 0.3 = (0.0 1001 1001 1001…)2. The lecture's answers, 0.0011 and 0.01001, are these same expansions cut off after a few bits.

This is the binary version of 1/3 = 0.3333… in decimal. A fraction has a finite binary form only if, written in lowest terms, its denominator is a power of 2. 0.375 = 3/8 ends; 0.2 = 1/5 and 0.1 = 1/10 do not. A computer has a fixed number of bits, so it cannot store 0.1 or 0.2 exactly. It stores the nearest value it can. That is why, in many programming languages, 0.1 + 0.2 prints 0.30000000000000004.

8Binary addition

It is the column method you learned in primary school. The only change is that a column "fills up" at 2 instead of 10:

0 + 0 = 0 0 + 1 = 1 1 + 1 = 10 (write 0, carry 1) 1 + 1 + 1 = 11 (write 1, carry 1; this happens when a carry arrives on top of 1 + 1)

Carries are shown in teal on the top line.

 111      carries
 01111       15
+00110     +  6
------     ----
 10101       21
11 1 11      carries
 11010011     211
+01010110   +  86
---------   -----
100101001     297

The second answer has 9 bits even though both inputs had 8: 297 is bigger than 255, the most a byte can hold. Keep that in mind for section 10.

With fractions, line up the points first and pad with zeros so both numbers have the same number of places, then add as usual:

     1     carries
 110.010      6.25
+001.011    + 1.375
--------    -------
 111.101      7.625

9Negative numbers

On paper you just write a minus sign. A computer has no minus sign, only bits. And there is one more fact about hardware you need first: it stores numbers in a fixed number of bits, such as 8, 16 or 32. Before we can talk about negative numbers we have to agree on the width. That is why everything below says "4-bit" or "8-bit". The same pattern 1101 means different things under different agreements.

Idea 1: sign-magnitude

Use the leftmost bit as a sign bit (بت الإشارة): 0 for +, 1 for −. The other bits hold the size. In 4 bits, +5 = 0101 and −5 = 1101. But read 1101 as a plain unsigned number and it is 13. The bits don't carry their meaning with them; the program has to know which agreement is in use.

Sign-magnitude has two problems. It has two zeros (0000 = +0 and 1000 = −0). And ordinary addition gives wrong answers: 5 + (−5) = 0101 + 1101 = 1 0010, which in 4 bits is 0010 = 2, not 0.

Idea 2: one's complement

To make −x, flip every bit of x. In 4 bits, 5 = 0101 so −5 = 1010, and −1 = 1110. Better, but there are still two zeros: 0000 and 1111.

Idea 3: two's complement (what computers actually use)

Flip every bit, then add 1. For −5 in 4 bits: 0101 → 1010 → 1011.

Why this particular recipe? Go back to the odometer, a 4-bit one showing 0000, and turn it backwards one step. Every wheel rolls back from 0 to 1: you get 1111. One step below zero is −1, so 1111 should mean −1. One more step back gives 1110 = −2, then 1101 = −3, 1100 = −4, 1011 = −5. That is exactly what flip-and-add-1 produced.

And why does the recipe always land on the right pattern? Add x to its flipped version: every column is 1 + 0, so you get 1111. Add 1 more and the odometer rolls over to 0000. So flipped-x + 1 is the number that, added to x, gives zero, which is exactly what −x should do. (As a check: in 4 bits, −5 is stored as the pattern for 16 − 5 = 11 = 1011.)

A second way to see it, often quicker for reading a pattern: in two's complement the leftmost bit is worth minus its usual place value. In 4 bits it is worth −8 instead of 8:

1011 = −8 + 0 + 2 + 1 = −5 (in 8 bits the leftmost bit is worth −128)

Here are all sixteen 4-bit patterns under each agreement:

BitsUnsignedSign-magnitudeOne's comp.Two's comp.
00000000
00011111
00102222
00113333
01004444
01015555
01106666
01117777
10008−0−7−8
10019−1−6−7
101010−2−5−6
101111−3−4−5
110012−4−3−4
110113−5−2−3
111014−6−1−2
111115−7−0−1

Three things to read off the table:

For n bits, two's complement covers −2n−1 to 2n−1 − 1:

4 bits: −8 to 7 8 bits: −128 to 127 16 bits: −32768 to 32767

Go back to the bit board and watch the "signed" box. Set 11111111 (−1) and 10000000 (−128). Press "Flip and add 1" on any pattern to negate it, and press it twice to get back where you started.

10Subtraction and overflow

This is why computers use two's complement: subtraction needs no circuit of its own, a − b = a + (−b). Make −b with flip-and-add-1, then add normally, keeping only n bits.

Example 1: 01111111 − 76, in 8 bits

76 = 01001100 flip = 10110011 add 1 → −76 = 10110100
111111       carries
 01111111     127
+10110100   +(−76)
---------   ------
100110011      51

The sum has a ninth bit. It is a carry out of the 8-bit width, and you simply drop it: the answer is 00110011 = 51, which is 127 − 76. Dropping that carry is correct; it is the odometer rolling past zero.

The lecture slide labels this ninth bit "overflow". In two's complement it is called a carry out, and it is dropped, because the answer is right. Overflow means something else, below.

Example 2: 00110010 + (−125), in 8 bits

125 = 01111101 flip = 10000010 add 1 → −125 = 10000011
      1      carries
 00110010      50
+10000011   +(−125)
---------   -------
 10110101     −75

No carry out this time. The leftmost bit is 1, so the result is negative. Its size is the two's complement of 10110101: flip to 01001010, add 1, get 01001011 = 75. So the answer is −75, and 50 − 125 = −75.

Overflow: when the answer does not fit

In 4 bits the largest number is 7. Ask for 6 + 3:

 11      carries
 0110      6
+0011    + 3
-----    ---
 1001     −7 ?

The true answer, 9, does not fit in 4-bit two's complement, so the pattern wraps round into the negatives. This is overflow (الفيضان). The rule for spotting it: overflow happens when you add two numbers of the same sign and the result has the opposite sign. Two positives giving a negative, or two negatives giving a positive. Adding a positive and a negative can never overflow, because the answer lies between the two. You can see it on the bit board too: 01111111 + 1 jumps from 127 to −128.

11Integers and characters in memory

Memory is a long row of bytes, each 8 bits. The bits have no meaning on their own. 01000001 could be the number 65, the letter A, or part of a real number; it depends on what the program has decided that byte is.

Integers in 2 bytes

Store 92 in a 16-bit word. 92 = 64 + 16 + 8 + 4 = 1011100. Pad on the left to 16 bits and group into nibbles:

92 = 0000 0000 0101 1100 = 0 0 5 C → 005C

Store −94 in two's complement, 16 bits:

94 = 0000 0000 0101 1110 flip = 1111 1111 1010 0001 add 1 = 1111 1111 1010 0010 = F F A 2 → FFA2

A check: FFA2 as unsigned is 65442, and 65536 − 94 = 65442. That is the 2n − x rule from section 9 with n = 16.

Characters: ASCII

Letters are stored as numbers. ASCII (American Standard Code for Information Interchange) is a table that gives each character a code: A = 65, B = 66, …, Z = 90; a = 97, b = 98, …; the digit "0" = 48; a space = 32. Compare a capital and small letter in binary:

A = 65 = 0100 0001 a = 97 = 0110 0001 differ by 32 = one bit

Capital and small versions of every letter differ in exactly the bit worth 32. ASCII codes go from 0 to 127, so they need only 7 bits, which leaves the leftmost bit of a byte free.

The parity bit: a simple error check

When data is sent or stored, a bit can occasionally flip. A parity bit is one extra bit, chosen so that the total number of 1s is even (even parity) or odd (odd parity). Here it goes in that free leftmost bit.

Store Q (ASCII 81) with even parity:

81 = 0101 0001 three 1s (odd) even parity → set the parity bit to 1 to make four 1s stored = 1101 0001 = D1

With odd parity, Q already has an odd count, so the parity bit is 0 and the byte is 0101 0001 = (51)16, still 81 in decimal.

The receiver counts the 1s. If one bit flipped on the way, the count is now wrong and the error is caught. If two bits flipped, the count is right again and the error slips through. Parity also cannot tell you which bit flipped, so it detects a single error but cannot fix it.

12Real numbers: floating point

Integers cannot hold 26.75, or a very small value like 0.000003. For those, computers use floating point (الفاصلة العائمة), which is scientific notation in base 2. In decimal, 26750 = 2.675 × 104: one digit before the point, and the power of 10 says where the point really belongs. In binary:

26.75 = (11010.11)2 = 1.101011 × 2⁴ (point moved 4 places left)

Writing it with exactly one 1 before the point is called normalising. Every number except 0 can be normalised this way, because in binary the first nonzero digit is always 1.

The 32-bit layout (single precision, IEEE 754)

Ssign, 1 bit
EEEEEEEEexponent, 8 bits
MMMMMMMMMMMMMMMMMMMMMMMmantissa (fraction), 23 bits

Worked: 26.75

1. binary: 26.75 = 11010.11 2. normalise: 1.101011 × 2⁴ 3. sign: positive → 0 4. exponent: 4 + 127 = 131 = 10000011 5. mantissa: 101011 then 17 zeros = 10101100000000000000000 6. the word: 0 10000011 10101100000000000000000 7. in hex: 0100 0001 1101 0110 0000 0000 0000 0000 = 41D60000

Try it: 32-bit float encoder

Type a decimal number such as 26.75, -26.75, 11.375 or 0.1. The tool shows the three fields and the word in hex, and tells you if the number could not be stored exactly.

Try 0.1 in the encoder. Its binary form repeats forever (section 7), and only 23 bits after the point are kept, so the stored value is a tiny bit off. With 24 bits of precision (23 stored plus the hidden 1), single precision keeps about 7 significant decimal digits.

13Practice

Do each one on paper before opening the answer. Several are the homework questions from the lectures.

1. Convert (21)10 and (15)10 to binary, and (200)10 to hex.

Show answer

21: 21÷2 = 10 r 1, 10÷2 = 5 r 0, 5÷2 = 2 r 1, 2÷2 = 1 r 0, 1÷2 = 0 r 1. Bottom-up: (10101)2. Check: 16 + 4 + 1 = 21.

15: remainders 1, 1, 1, 1, so (1111)2. 15 = 16 − 1, the largest 4-bit number.

200: 200÷16 = 12 r 8, 12÷16 = 0 r 12. Remainder 12 is the digit C, so bottom-up: (C8)16. Check: 12×16 + 8 = 200.

2. Convert 1010b, 0010b and 101b to decimal.

Show answer

1010b = 8 + 2 = 10. 0010b = 2 (leading zeros change nothing). 101b = 4 + 1 = 5.

3. Convert to octal: 1011010112 and 1001010012.

Show answer

101 101 011 → (553)8. 100 101 001 → (451)8. (Check the first: 5×64 + 5×8 + 3 = 363, and 256 + 64 + 32 + 8 + 2 + 1 = 363.)

4. Convert to decimal: (72)8, (72)16, (DE1)16.

Show answer

(72)8 = 7×8 + 2 = 58. (72)16 = 7×16 + 2 = 114. (DE1)16 = 13×256 + 14×16 + 1 = 3553. Same digits, different bases, different values.

5. (AB)16 = ( ? )2

Show answer

A = 1010, B = 1011, so (10101011)2. (That is 171.)

6. (23)4 = ( ? )8

Show answer

Via decimal: 2×4 + 3 = 11 = 1×8 + 3, so (13)8.

Via binary: base 4 digits are 2 bits each, 2 = 10, 3 = 11, giving 1011; regroup in threes: 001 011 = (13)8.

7. (35)7 = ( ? )8

Show answer

7 is not a power of 2, so go through decimal: 3×7 + 5 = 26. Then 26÷8 = 3 r 2, 3÷8 = 0 r 3, giving (32)8.

8. (72E)16 = ( ? )8

Show answer

7 = 0111, 2 = 0010, E = 1110: 0111 0010 1110. Regroup in threes from the right: 011 100 101 110 = (3456)8. (Both are 1838 in decimal.)

9. Convert 37.375 to binary.

Show answer

37 = 32 + 4 + 1 = 100101. 0.375: ×2 = 0.75 (0), ×2 = 1.5 (1), ×2 = 1.0 (1), so .011. Answer: (100101.011)2.

10. Convert 0.2 to binary. Why can't you finish?

Show answer

0.0011 0011 0011… After four steps the fraction is 0.2 again, so the bits repeat forever. 0.2 = 1/5, and 5 is not a power of 2.

11. Write −5 in 4-bit two's complement, and −76 in 8-bit two's complement.

Show answer

−5: 0101 → 1010 → 1011. Check: −8 + 2 + 1 = −5.

−76: 01001100 → 10110011 → 10110100. Check: −128 + 32 + 16 + 4 = −76.

12. In 4-bit two's complement, work out 0101 + 0100. Is the answer correct?

Show answer

0101 + 0100 = 1001, which reads as −7. Wrong: 5 + 4 = 9 does not fit in the range −8 to 7. Two positives gave a negative, so this is overflow.

13. In 8-bit two's complement, work out 45 − 100.

Show answer
45 = 00101101 100 = 01100100 → flip 10011011 → +1 = 10011100 (−100) 00101101 + 10011100 = 11001001

No carry out. The leftmost bit is 1, so the answer is negative. Its size: flip 00110110, add 1, 00110111 = 55. So the answer is −55, as it should be. A positive plus a negative cannot overflow.

14. Represent the integer −1 in 2 bytes, in hex.

Show answer

1 = 0000 0000 0000 0001; flip: 1111 1111 1111 1110; add 1: 1111 1111 1111 1111 = FFFF. (The odometer one step below zero.)

15. Store your name in memory in ASCII with odd parity, in hex. Try it with the name "Sami".

Show answer
CharASCII7-bit code in a byte1sParity bitStoredHex
S830101 0011411101 0011D3
a970110 0001300110 000161
m1090110 1101500110 11016D
i1050110 1001411110 1001E9

Memory: D3 61 6D E9. With odd parity, the bit is 1 only when the count of 1s is even. Now do your own name.

16. Encode 11.375 as a 32-bit float.

Show answer

11.375 = 1011.011 = 1.011011 × 23. Sign 0. Exponent 3 + 127 = 130 = 10000010. Mantissa 01101100000000000000000.

Word, then the same bits in groups of 4, then hex:

0 10000010 01101100000000000000000 0100 0001 0011 0110 0000 0000 0000 0000 = 41360000

Check it in the encoder above.