0% found this document useful (0 votes)
68 views

Learning-Material-in Math

The document discusses simple interest and how to calculate future value and maturity value using simple interest formulas. It provides examples of calculating: 1) Simple interest earned on deposits and loans for given principal, interest rate, and time periods. 2) Maturity value of loans by adding the calculated interest to the original principal. 3) Future value of investments using the formula Future Value = Principal × (1 + Interest Rate × Time Period), where time period must match the interest rate term (e.g. annual, monthly).

Uploaded by

michietorres7
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views

Learning-Material-in Math

The document discusses simple interest and how to calculate future value and maturity value using simple interest formulas. It provides examples of calculating: 1) Simple interest earned on deposits and loans for given principal, interest rate, and time periods. 2) Maturity value of loans by adding the calculated interest to the original principal. 3) Future value of investments using the formula Future Value = Principal × (1 + Interest Rate × Time Period), where time period must match the interest rate term (e.g. annual, monthly).

Uploaded by

michietorres7
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Chapter 5

The Mathematics of Finance

Learning Outcomes:

At the end of the chapter, the students shall be able to:


1. differentiate simple and compound interest
2. examine the different interest rates applied to credit cards and consumer loans,
stocks, bonds, mutual funds, and home ownership

5.1 Simple Interest

When you deposit money in a bank—for example, in a savings account—you are


permitting the bank to use your money. The bank may lend the deposited money to customers
to buy cars or make renovations on their homes. The bank pays you for the privilege of using
your money. The amount paid to you is called interest. If you are the one borrowing money
from a bank, the amount you pay for the privilege of using that money is also called interest.
The amount deposited in a bank or borrowed from a bank is called the principal. The amount
of interest paid is usually given as a percent of the principal. The percent used to determine
the amount of interest is called the interest rate. If you deposit $1000 in a savings account
paying 5% interest, $1000 is the principal and the interest rate is 5%. Interest paid on the
original principal is called simple interest. The formula used to calculate simple interest is
given below.

The simple interest formula is I = Prt,

where I is the interest, P is the principal, r is the interest rate, and t is the time period. In the
simple interest formula, the time t is expressed in the same period as the rate. For example, if
the rate is given as an annual interest rate, then the time is measured in years; if the rate is
given as a monthly interest rate, then the time must be expressed in months. Interest rates
are most commonly expressed as annual interest rates. Therefore, unless stated otherwise,
we will assume the interest rate is an annual interest rate. Interest rates are generally given
as percents. Before performing calculations involving an interest rate, write the interest rate
as a decimal.

Example 1. Calculate the simple interest earned in 1 year on a deposit of P1000 if the
interest rate is 5%.

Solution:
Use the simple interest formula. Substitute the following values into the formula:
P = 1000, r = 5%, and t = 1

I = Prt
I = 1000(0.05)(1)
I = 50

The simple interest earned is P50.


Example 2. Calculate the simple interest due on a three-month loan of P2000 if the
interest rate is 6.5%.

90
Solution:
Use the simple interest formula. Substitute the following values into the formula:

P = 2000, r = 6.5% = 0.065. Because the interest rate is an annual rate, the
3 months 3
time must be measure in years: 𝑡 = ̅̅̅̅̅̅̅̅̅̅̅̅̅̅ = ̅̅̅̅
12 months 12
I = Prt
I = 2000(0.065)(3/12)
I = 32.5

The simple interest due is P32.50.

Example 3. Calculate the simple interest due on a two-month loan of P500 if the
interest rate is 1.5% per month.

Solution:
Use the simple interest formula. Substitute the following values into the formula:

P = 500, r = 1.5% = 0.015. Because the interest rate is per month, the time
period of the loan is expressed as the number of months 𝑡 = 2
I = Prt
I = 500(0.015)(2)
I = 15

The simple interest due is P15.

Remember that in the simple interest formula, time t is measured in the same period
as the interest rate. Therefore, if the time period of a loan with an annual interest rate is given
in days, it is necessary to convert the time period of the loan to a fractional part of a year.
There are two methods for converting time from days to years; the exact method and the
ordinary method. Using the exact method, the number of days of the loan is divided by 365,
the number of days in a year.

number of days
Exact method: 𝑡 =
̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
365

The ordinary method is based on there being an average of 30 days in a month and
12 months in a year (30)(12) = 360. Using this method, the number of days of loan is divided
by 360.

number of days
Ordinary method: 𝑡 =
̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
360

Example 4. Calculate the simple interest due on a 45-day loan of P3500 if the interest
rate is 8% per month.

Solution:
Use the simple interest formula. Substitute the following values into the formula:
P = 3500, r = 8% = 0.08. Because the interest rate is per month, the time period
45
of the loan is expressed as the number of months 𝑡 = .
360
I = Prt
I = 3500(0.08)(45/360)
I = 35

91
The simple interest due is P35.

The simple interest formula can be used to find the interest rate on a loan when the
interest, principal, and time period of the loan are known. An example is given below.

Example 5. The simple interest charged on a six-month loan of P3000 is P150. Find
the simple interest rate.
Solution
Use the simple interest formula. Solve the equation for r.
I = Prt
150 = 3000(r)(6/12)
150 = 1500r
0.10 = r, r = 10%

The simple interest rate on the loan is 10%.

Exercise 5.1

A. In items 1 – 5, calculate the simple interest earned. Show your solution

No. Principal (P) Rate (r) Time (t) Interest(I)

1 2000 6% 1 year

2 12,000 7.8% 45 days

3 3000 9.6% 21 days

4 3500 1.8% 4 months

5 7000 7.2% 114 days

B. In items 6 – 10, solve each of the following problems

1. Calculate the simple interest earned in 1 year on a deposit of P1900 if the interest rate
is 8%.
2. Calculate the simple interest earned in 1 year on a deposit of P2300 if the interest rate
is 7%.
3. You deposit P1500 in an account earning 10.4% interest. Calculate the simple interest
earned in 6 months.
4. Calculate the simple interest due on 150-day loan of P4800 if the interest rate is 7.25%.
5. Calculate the simple interest due on a two-month loan of P800 if the interest rate is
1.5% per month.

92
5.2 Future Value and Maturity Value
When you borrow money, the total amount to be repaid to the lender is the sum of the
principal and interest. This sum is calculated using the following future value or maturity value
formula for simple interest.

The future or maturity value for simple interest is

A = P + I, where A is the amount after the interest, I, has been added to the
principal, P.
This formula can be used for loans or investments. When used for a loan, A is the total
amount to be repaid to the lender; this sum is called the maturity value of the loan.

For an investment, such a deposit in a bank savings account, A is the total amount
on deposit after the interest has been added to the principal. Tis sum is called the future value
of the investment.

Example 1. Calculate the maturity value of a simple interest, eight-month loan of


P8000 if the interest rate is 9.75%

Solution
Step 1. Find the interest. Use the simple interest formula
I = Prt
I = 8000(0.0975)(8/12)
I = 520

Step 2. Find the maturity value. Use the maturity value formula.
A=P+I
A = 8000 + 520
A = 8520
The maturity value of the loan is P8520.

Recall that the simple interest formula states that I = Prt. Hence, by substitution

A=P+I
A = P + Prt
A = P (1+rt),
where A is the future value of an investment or the maturity value of a
loan, P is the principal, r is the interest rate, and t is the time period.

We can use the formula in example 6.


A = P (1 + rt)
A = 8000 [1 + 0.0975(8/12)]
A = 8520

Example 2. Calculate the maturity value of a simple interest, three-month loan of


P3800 if the interest rate is 6%
Solution:
Find the interest. Use the simple interest formula
A = P (1 + rt) = 3800 [1 + 0.06(3/12)] = 3857
The maturity value of the loan is P3857.
Day-of-the-Year Table

93
Day Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
1 1 32 60 91 121 152 182 213 244 274 305 335
2 2 33 61 92 122 153 183 214 245 275 306 336
3 3 34 62 93 123 154 184 215 246 276 307 337
4 4 35 63 94 124 155 185 216 247 277 308 338
5 5 36 64 95 125 156 186 217 248 278 309 339
6 6 37 65 96 126 157 187 218 249 279 310 340
7 7 38 66 97 127 158 188 219 250 280 311 341
8 8 39 67 98 128 159 189 220 251 281 312 342
9 9 40 68 99 129 160 190 221 252 282 313 343
10 10 41 69 100 130 161 191 222 253 283 314 344
11 11 42 70 101 131 162 192 223 254 284 315 345
12 12 43 71 102 132 163 193 224 255 285 316 346
13 13 44 72 103 133 164 194 225 256 286 317 347
14 14 45 73 104 134 165 195 226 257 287 318 348
15 15 46 74 105 135 166 196 227 258 288 319 349
16 16 47 75 106 136 167 197 228 259 289 320 350
17 17 48 76 107 137 168 198 229 260 290 321 351
18 18 49 77 108 138 169 199 230 261 291 322 352
19 19 50 78 109 139 170 200 231 262 292 323 353
20 20 51 79 110 140 171 201 232 263 293 324 354
21 21 52 80 111 141 172 202 233 264 294 325 355
22 22 53 81 112 142 173 203 234 265 295 326 356
23 23 54 82 113 143 174 204 235 266 296 327 357
24 24 55 83 114 144 175 205 236 267 297 328 358
25 25 56 84 115 145 176 206 237 268 298 329 359
26 26 57 85 116 146 177 207 238 269 299 330 360
27 27 58 86 117 147 178 208 239 270 300 331 361
28 28 59 87 118 148 179 209 240 271 301 332 362
29 29 88 119 149 180 210 241 272 302 333 363
30 30 89 120 150 181 211 242 273 303 334 364
31 31 90 151 212 243 304 365

The day-of-the-year table can be used to determine the number of days from one date
to another date. For example, because May 15 is day 135 and August 23 is day 235, there
are 235 – 135 = 100 days from May 15 to August 23.

The table can also be used to determine the due date of a loan. For example, a 12-0-
day loan made on June 9, which is day 160, is due on day 160 – 120 = day 280, which is
October 7.

Example 3. Calculate the simple interest due on a P5000 loan made on September
20 and repaid on December 9 of the same year. The interest rate is 6%.

Solution:
September 20 is day 263. December 9 is day 343.
343 – 263 = 80. The term of the loan is 80 days. Hence,
I = Prt
I = 5000 (0.06)(80/360)
I = 66.67
The simple interest due is P66.67.

94
Try the following:

1. Find the due date on a 180-day loan made on March 10.


2. Find the number of days from April 22 to Novemebr 8 of the same year.
3. Calculate the simple interest due on a P7500 loan made on January 30 and repaid
on July 18 of the same year. The interest rate is 6.5%. The year is not a leap year.
4. A P15,000 loan is made on August 28. The interest rate is 7%. The loan is repaid
on January 20 of the following year. Calculate the simple interest due on the loan.

Exercise 5.2

A. In items 1 – 5, use the formula A = P (1 + rt) to calculate the maturity value of the
simple interest loan.

No. Principal (P) Rate (r) Time (t) Interest(I)

1 2000 6% 1 year

2 12,000 7.8% 45 days

3 3000 9.6% 21 days

4 3500 1.8% 4 months

5 7000 7.2% 114 days

B. In items 6 – 10, solve each of the following problems.

6. Calculate the maturity vale of a simple interest, eight-month loan of P7000 if the
interest rate is 8.7%.
7. Calculate the maturity value of a simple interest, 10-month loan of P6,600 if the
interest rate is 9.75%.
8. You deposit P880 in an account paying 9.2% simple interest. Find the future vaue
of the investment after 1 year.
9. You deposit P750 in an account paying 7.3% simple interest. Find the future value
of the investment after 1 year.
10. The simple interest charged on a 6-month loan of P2700. Find the simple interest
rate.

95
5.3 Compound Interest
Simple interest is generally used for loans of 1 year or less. For loans of more than 1
year, the interest paid on the money borrowed is called compound interest. Compound
interest is the interest calculated not only on the original principal, but also on any interest
that has already been earned.
To illustrate compound interest, suppose you deposit P1000 in a savings account
earning 5% interest, compounded annually (once a year).

During the first year, the interest earned is calculated as follows.

I = Prt
I = 1000(0.05)(1) = 50

At the end of the first year, the total amount in the account is
A=P+I
A = 1000 + 50 = 1050

During the second year, the interest earned is calculated using the amount in the
account at the end of the first year.

I = Prt
I = 1050(0.05)(1) = 52.50

Note that the interest earned during the second year (P52.50) is greater than the
interest earned during the first year (P50). This is because the interest earned during the first
year was added to the original principal, and the interest for the second year wa calculated
using this sum. If the account earned simple interest rather than compound interest, the
interest earned each year would be the same (P50).

At the end of the second year, the total amount in the account is the sum of the amount
in the account at the end of the first year and the interest earned during the second year.
A=P+I
A = 1050 + 2.50 = 1102.50

The interest earned each year keeps increasing. This is the effect of compound
interest.
In the given example, the interest is compounded annually. However, compound
interest can be compounded semi-annually (twice a year), quarterly (four times a year),
monthly or daily. The frequency with which interest is compounded is the compounding
period.

If, in the preceding example, interest is compounded quarterly rather than annually,
3 1
then the first interest payment on the P1000 in the account occurs after 3 months (𝑡 = = ;
12 4
3 months is one quarter of a year). That interest is then added to the account, and the interest
earned for the second quarter is calculated using that sum.

End of 1st quarter: I = Prt = (1000)(0.50)(3/12) = 12.50


A = P + I = 1000 + 12.50 = 1012.50

End of 2nd quarter: I = Prt = (1012.50)(0.50)(3/12) = 12.65625


A = P + I = 1012.50 + 12.66 = 1025.16

End of 3rd quarter: I = Prt = (1025.16)(0.50)(3/12) = 12.81

96
A = P + I = 1025.16 + 12.81 = 1037.97

End of 4th quarter: I = Prt = (1037.97)(0.50)(3/12) = 12.97


A = P + I = 1037.97 + 12.97 = 1050.94
The total amount in the account at the end of the first year is P1050.94.

Example 1. (Future Value)

You deposit P500 in an account earning 6% interest, compunded semi-


annually. How much is in the account at the ebd of 1 year?

Solution: The interest is compounded every 6 months. Calculate the amount


in the account after the first 6 months. t = 6/2

A = P(1 + rt)
A = 500[1 + 0.06(6/12)]
A = 515

Calculate the amount in the account after the second 6 months.


A = P(1 + rt)
A = 515[1 + 0.06(6/12)]
A = 530.45
The total amount in the account at the end of 1 year is P530.45

Compound Interest Formula


𝑟
𝐴𝑛 = 𝐴𝑜 (1 + )𝑛𝑠 where An = total amount (interest +principal)
𝑠
Ao = principal invested (original amount)
r = rate of annual interest
n = no. of times per year the interest is compounded
s = no. of years the principal is invested

Example 1. How much money will Mr. Agustin have at the end of 5 years if he deposits
P1000 at 9% interest compounded semi-annually?
𝑟
Solution: Using the formula, we have 𝐴𝑛 = 𝐴𝑜 (1 + )𝑛𝑠
𝑠

0.09 2(15)
𝐴𝑛 = 1000(1 + )
2

𝐴𝑛 = 𝑃1552.97

Example 2. Mang Lando invested P25,000 at an annual interest rate of 8%


compounded quarterly. Find the total amount at the end of 5 years.
𝑟
Solution: Using the formula, we have 𝐴𝑛 = 𝐴𝑜 (1 + )𝑛𝑠
𝑠

0.08 5(4)
𝐴𝑛 = 25000(1 + )
4

𝐴𝑛 = 𝑃37100

97
Try this

Using example no. 2, how much money will Mang Lando have if interest is
compounded

a. Quarterly

b. Monthly

c. Daily

Exercise 5.3

A. In items 1 – 5, calculate the compound amount using the formula

No. Principal (P) Rate (r) mode Time (t) Amount (A)

1 1200 7% Semi-annually 12 yrs

2 3500 8% Semi-annually 14 yrs

3 1700 9% daily 5 yrs

4 9600 6% monthly 3 yrs

5 8600 11% Bi-monthly 3 yrs

B. Solve each of the following problems

1. On his 18th birthday, Merly’s parents placed P10,000 in time deposit at 10%
compounded monthly. In 10 years, how much money would be available for her
educational expenses?

2. For the college education of his son, the father of a 7-year old boy wants to put
enough money in time deposit at 14% annual interest compounded yearly. How
much must he deposit ti have P60,000 when his son reaches 18 years old?

3. A man invests P5000 at 8% annual interest compounded monthly. How many


years will it take him to earn P20,000 interest?

98
5.4 Credit Cards
When a customer uses a credit card to make a purchase, the customer is actually
receiving a loan. Therefore, there is frequently added cost to the consumer who purchases on
credit. This added cost may be in the form of an annual fee or interest charges on purchases.
A finance charge is an amount paid in excess of the cash price; it is the cost to the customer
for the use of credit.

Most credit card companies issue monthly bills. The due date on the bill is usually 1
month after the billing date (the date the bill is prepared and sent to the customer). If the bill is
paid in full by the due date, the customer pays no finance charge. If the bill is not paid in ful by
the due date, a finance charge is added to the next bill.

Suppose a credit card billing date is 10th day of each month. If a credit card purchase
is made on April 15, then May 10 is the billing date (the 10th day of the month following April).
The due date is June 10 (one month from the billing date). If the bill is paid in full before June
10, no finance charge is added. However, if the bill is not paid in full, interest charges on the
outstanding balance will start to accrue (be added) on June 10, and any purchase made after
June 10 will immediately start accruing interest.

The most common method of determining finance charges is the average daily
balance method. Interest charges are based on the credit card’s average daily balance,
which is calculated by dividing the sum of the total amounts owed each day of the month by
the number of days in the billing period.

sum of total amounts owed each day of the month


Average Daily Balance = ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
number of days in the billing period

Suppose an unpaid bill for P315 had a due date of April 10. A purchase of P28 was
made on April 12, and P123 was charged on April 24. A payment of P50 was made on April
15. The next billing date is May 10. The interest on the average daily balance is 1.5% per
month. Find the finance charge on the May 10 bill.

To find the finance charge, first prepare a table showing the unpaid balance for each
purchase, the number of days the balance is owed, and the product of these numbers. A
negative sign in the Payments or Purchase column of the table indicates that a payment was
made on that date.

Payments
Balance No. of Days Until Unpaid Balance
Date or
Each Day Balance Charges Times No.of Day
Purchases
April 10-11 315 2 630
April 12-14 28 343 3 1029
April 15-23 -50 293 9 2637
April 24- May 9 123 416 16 6656
Total 10,952

The sum of the total amounts amount owed each day of the month is PhP10,952.

99
Find the average daily balance.

sum of total amounts owed each day of the month


Average Daily Balance = ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
number of days in the billing period
10,952
= = 365.07
̅̅̅̅̅̅̅̅̅
30
Find the finance charge.
I = Prt = 365.07 (0.015)(1)
I = 5.48

The finance on the May 10 bill is PhP 5.48

Example 2. (Calculate interest on a Credit Card Bill)

An unpaid bill for P620 had a due date of March 10. A purchase of P214 was
made on March 15, and P67 was charged on March 30. A payment of P200 was made
on March 22. The interest on the average daily balance is 1.5% per month. Find the
finance charge on April 10 bill

Solution:

First, calculate the sum of the total amounts owed each day of the month.
Payments
Balance No. of Days Until Unpaid Balance
Date or
Each Day Balance Charges Times No.of Day
Purchases
Mar 10-14 620 5 3100
Mar 15-21 214 834 7 5838
Mar 22-29 -200 634 8 5072
Mar 30-Apr 9 67 701 11 7711
Total 21,721

The sum of the total amounts owed each day of the month is P21,721.

As to the average daily balance, by using the formula


21,721
Ave. Daily Balance = ̅̅̅̅̅̅̅̅̅̅ = 𝑃700.68
31

As to the finance charge, using the formula


I = Prt = 700.68(0.015)(1) = 10.51

The finance charge on April 10 bill is P10.51

Try this:
A bill for P1024 was due on July 1. Purchases of P315 were made on July 7,
and P410 was charged on July 22. A payment of P400 was made on July 15.
The interest on the average daily balance is 1.2% per month. Find the finance
charge on the August 1 bill.

100
Exercise 5.4

In items 1-4, calculate the finance charge for a credit card that has the given average daily
balance and interest rate.

1. Average daily balance, 118.72; monthly interest rate, 1.25%.


2. Average daily balance, 391.64; monthly interest rate, 1.75%.
3. Average daily balance, 10,154.87; monthly interest rate, 1.5%.
4. Average daily balance, 20,346.91; monthly interest rate, 1.25%.
5. Average Daily Average: A credit card amount had a P244 balance on March 5. A purchase
of P152 was made on March 28. Find the average daily balance if the billing date is April 5.
6. Average Daily Average: A credit card account has a P768 balance on April 1. A purchase
of P316 was made on April 5, and a payment of P200 was made on April 18. Find the
average daily balance if the new billing date is May 1.
7. Finance Charges: A charge account had a balance of P944 on May 5. A purchase of P255
was made on May 17, and a payment of P150 was made on May 20. The interest on the
average daily balance is 1.5% per month. Find the finance charge on the June 5 bill.
8. On August 10, a credit card account had a balance of P345. A purchase of P56 was made
on August 15, and P157 was charged on August 27. A payment of P75 was made on
August 15. The interest on the average daily balance is 1.25% per month. Find the finance
charge on September 10 bill.

5.5 Stocks, Bonds, and Mutual Funds

5.5.1 Stocks

Stocks, bonds, and mutual funds are investment vehicles, but they differ in nature.
When owners of a company want to raise money, generally to expand their business, they
may decide to sell part of the company to investors. An investor who purchases a part of the
company is said to own stock in the company. Stock is measured in shares; a share of stock
in a company is a certificate that indicates partial ownership in the company. The owners of
the certificates are called stockholders or shareholders. As owners, the stockholders share
in the profits or losses of the corporation.

A company may distribute profits to its shareholders in the form of dividends. A


dividend is usually expressed as a per-share amount—for example, P7 per share.

Example 1. (Calculate dividends paid to a stockholder)

A stock pays an annual dividend of P0.84 per share. Calculate the dividends
paid to a shareholder who has 200 shares of the company’s stock.

Solution:
(0.84 per share) x (200 shares) = P168
The shareholder receives P168 in dividends.
A dividend yield, which is used to compare companies’ dividends, is the
share amount of the dividend divided by the stock price and is expressed as a
percent. Determining a dividend yield is similar to calculating the simple interest
rate earned, the stock price as the principal, and the yield as the interest rate.

101
Example 2. (Calculate a dividend yield)

A stock pays an annual dividend of P1.75 per share. The stock is trading at
P70. Find the dividend yield.

Solution:
I = Prt
1.75 = 70 r (1), let I = annual dividend, P = stock price
r = 0.025, the dividend yield is 2.5%

5.5.2 Bonds

When a corporation issues stock, it is selling part of the company to the stockholders.
When it issues a bond, the corporation is borrowing money from the bondholders; a
bondholder lends money to a corporation. Corporations and government agencies issue
bonds. These entities need money to operate—for example, to fund the government deficit,
repair roads, or build a new factory—so they borrow money from the public by issuing bonds.

Bonds are usually issued in units of P1000. The price paid for the bond is the face
value. The issuer promises to repay the bondholder on a particular day, called the maturity
date, at a given rate of interest, called the coupon.

Assume that a bond with a P1000 face value has a 5% coupon and a 10-year maturity
date. The bondholder collects interest payments of P50 in each of those 10 years. The
payments are calculated using the simple interest formula, as shown below.

I = Prt
I = 1000(0.05)(1)
I = 50
At the end of the 10-year period, the bondholder receives from the issuer the P1000
face value of the bond.

Example 3. (Calculate Interest payments on a Bond)

A bond with a P10,000 face value has a 3% coupon and a 5-year maturity date.
Calculate the total of the interest payments paid to the bondholder.

Solution: Use the simple interest formula to find the annual interest payments.
Substitute the following values into the formula: P = 10,000, r = 3%, and t = 1.

I = Prt = 10,000(0.03)(1) = 300

Multiply the annual interest payments by the term of the bond,


300(5) = 1500

The total of the interest payments paid to the bondholder is P1500.

5.5.3 Mutual Funds

An investment trust is a company whose assets are stocks and bonds. The purpose of
these companies is not to manufacture a product but to purchase stocks and bonds with the
hope that their value will increase. A mutual fund is an example of investment trust.

102
When investors purchase shares in a mutual fund, they are adding their money to a
pool along with many other investors. The investments within a mutual fund are called the
funds’ portfolio. The investors in a mutual fund share the fund’s profits or losses from the
investments in the portfolio.

An advantage of owning shares of a mutual fund is that your money is managed by


full-time professionals whose job it is to research and evaluate stocks; you own stocks without
having to choose which individual stocks to buy or to decide when to sell them. Another
advantage is that by owning shares in the fund, you have purchased shares of stock in many
different companies. This diversification helps to reduce some of the risks on investing.

Because a mutual fund owns many different stocks, each share of the fund owns a
fractional interest in each of the companies. Each day, the value of a share in the fund, called
the net asset of the fund, or NAV, depends on the performance of the stocks in the fund. It is
calculated by the following formula:

Net Asset Value of a Mutual Fund


A−L
NAV = ̅̅̅̅̅̅̅̅
N

where: A is the total fund assets


L is the total fund liabilities
N is the no. of shares outstanding

Example 4. (Calculate the net asset value of, and the number of, shares purchased
in a mutual fund)

A mutual fund has P600M worth of stock, P5M worth of bonds, and P1M in
cash. The fund’s total liabilities amount to P2M. There are 25 million shares
outstanding. You invest P15,000 in this fund.

a. Calculate the NAV


b. How many shares will you purchase?

Solution:
A − L 606 million − 2 million
a. NAV = ̅̅̅̅̅̅̅̅ = ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅ = 24.16
N 25 million
The NAV of the fund is P24.16

15,000
b. = 620
̅̅̅̅̅̅̅̅̅̅
24.16

You will purchase 620 shares of the mutual fund.

Try these:

1. Annual Dividends. A stock pays an annual dividend of P1.02 per share. Calculate
the dividends paid to a shareholder who has 375 shares of the company’s stock
2. Annual Dividends. A stock pays an annual dividend of P0.58 per share. Calculate
the dividends paid to a shareholder who has 1500 shares of the company’s stock.
3. Dividend Yield. Find the dividend yield for a stock that pays an annual dividend of
P1.24 per share and has a current price of P49.375. Round to the nearest hundredth
of a percent.

103
4. Dividend Yield. A cooperative has declared an annual dividend of P0.50 per share.
The stock is trading at P40 per share. Find the dividend yield.

5.6 Home Ownership

Initial Expenses. When you purchase a home, you generally make a downpayment
and finance the remainder of the purchase price with a loan obtained through a bank or
savings or loan association. The amount of the downpayment can vary, but it is normally
between 10% and 30% of the selling price. The mortgage is the amount that is borrowed to
buy the real estate. The amount of the mortgage is the difference between the selling price
and the downpayment.

Mortgage = selling price – downpayment

This formula is used to find the amount of the mortgage. For example, suppose you
buy a P240,000 home with a downpayment of 25% of the purchase price.

Downpayment = 25% of 240,000 = 0.25(240,000)


= 60,000

Then find the mortgage by subtracting the downpayment from the selling price.

Mortgage = selling price – downpayment


= 240,000 – 60,000
= 180,000
The mortgage is P180,000.

The downpayment is generally the largest initial expense in purchasing a home, but
there are other epenses associated with the purchase. These payments at the closing, when
the sale of the house is finalized, and are called closing costs. The bank may charge fees
for attorneys, credit reports, loan processing, and title searches. There may also be a loan
origination fee. This fee is usually expressed in points. One point is equal to 1% of the
mortgage.

Suppose you purchase a home and obtain a loan for P180,000. The bank charges a
fee of 1.5 points. To find the charge for points, multiply the loan amount by 1.5%.

Point = 1.5% of 180,000 = 2700

Hence, the charge for points is P2700.

Example 1. (Calculate downpayment and the closing cost)


The purchase price of a home is P392,000. A downpayment of 20% is made.
The bank charges P450 in fees plus 2.5 points. Find the total of the downpayment and
the closing costs.

Solution:
Downpayment = 20% of P392,000 = 78,400
The downpayment is P78,400.

Next, find the mortgage,


Mortage = selling price – downpayment
= 392,000 – 78400

104
= 313, 600
Hence, the mortgage is P313,600.

Then, calculate the charge for points,


Points = 2.5% of 313,6000 = 7840
Hence, the charge for points is P7840.

Finally, find the sum of the downpayment and closing costs.


78,400 + 450 + 7840 = 86,690
SO, the total of the downpayment and the closing costs is P86,690.

Mortgages

When a bank agrees to provide you with a mortgage, you agree to pay off that loan in
monthly payments. If you fail to make the payments, the bank has the right to foreclose, which
means that the bank takes possession of the property and has the right to sell it. There are
many types of mortgages available to home buyers today, so the terms of mortgages differ
considerably. Some mortgages are adjustable rate mortgages (ARMs). The interest rate
charged on an ARM is adjusted periodically to more closely reflect current interest rates. The
mortgage agreement specifies exactly how often and how much the interest rate can change.

A fixed rate mortgage or conventional mortgage is one in which the interest rate
charged on the loan remains the same throughout the life of the mortgage. For a fixed rate
mortgage, the amount of the monthly payment also remains unchanged throughout the term
for the loan.

The term of a mortgage can vary. Terms of 15, 20, 25, and 30 years are most common.

The monthly payment on a mortgage is the mortgage payment. The amount of the
mortgage payment depends on the amount of the mortgage, the interest rate on the loan, and
the term of the loan. This payment is calculated by using the payment formula for an APR
loan.

The mortgage payment for a mortgage is given by


𝑖
𝑃𝑀𝑇 = 𝐴 ( )
1 − (1 + 𝑖)−𝑛

where PMT is the monthly mortgage payment, A is the amount of the


mortgage, i is the interest rate per payment period, and n is the total
number of payments.

Example 2. (Calculate mortgage payment)


Suppose Allison Trading purchase a condominium and secures a loan of
P134,000 for 30 years at an annual interest rate of 6.5%.
a. Find monthly mortgage payment
b. What is the total of the payments over the life of the loan?
c. Find the amount of interest paid on the loan over the 30 years.

Solution:
annual interest rate 0.065
a. 𝑖 = ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅ = ̅̅̅̅̅̅̅
number of payments per year 12
0.065
12
𝑃𝑀𝑇 = 134,000 (̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅ ) = 846.97
0.065 −360
1 − (1 + )
12

105
b. To determine the total of the payments, multiply the number of payments (360) by
the monthly payment (846.97)

846.97(360) = 304,909.20

c. To determine the amount of interest paid, subtract the mortgage from the total of
the payments

304,909.20 – 134,000 = 170,909.20

The amount of interest paid over life of the loan is P170,909.20

Exercise 5.5

Solve each of the following problems.

1. You buy a P258,000 home with downpayment of 25%. Find the amount of the
downpayment and the mortgage amount.
2. Mr. Co purchases a home and secures a loan of P250,000. The bank charges a fee of
2.25 points. Find the charge for the points.
3. The purchase price of a home is P309,000. A downpayment of P30% is made. The
bank charges P350 fees plus 3 points. Find the total of the downpayment and the
closing costs.

106
Chapter 6
Codes

Learning Outcomes:

At the end of the chapter, the students shall be able to:


1. Define bits and binary systems;
2. Decipher binary codes;
3. Convert decimal numbers to binary and vice versa;
4. Use coding schemes to encode and decode different types of information for
identification, privacy and security purposes;
5. Exemplify honesty and integrity when using codes for security purposes.

Introduction

Language teaches people how to communicate and socialize with one another. It
enables them to comprehend all the things that occur in the environment. On the other hand,
coding operates in its own unique language. Understanding coding helps us to know how the
technology works around us and makes us much better in utilizing and interacting with it.

Computers exist in almost all of everyday functions of the society such as financing
and accounting, transportation, researches and various professions. Computers would be
useless without the utility of coding. Codes are the set of instructions that computers follow.
Computers operate based from the codes that tells it what to do.

6.1 Number Systems

A number system is a collection of distinct symbols or characters. This system is


composed of three (3) important components: digits (the distinct characters in the system),
digit positioning (the digit’s place based from the power of the base) and base (the number of
digits in the system).

Decimal Number System

The Decimal Number System is a 10 digit (deci=10) number system that that people
use in daily activities. The digits are 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. Its base is 10 and each
position is represented by the powers of 10.

4 0 6 2
103 102 101 100
thousands hundreds tens ones

107
Binary Number System

The Binary Number System, on the other hand, is a number system familiar to people
who operates computers. It is a two-digit number system represented by the numbers zero (0)
and one (1). Its base is 2 and the positions are represented by the power of 2.

1 0 0 1
23 22 21 20
eights fours twos ones

6.2 Binary Codes

Most computers and computerized devices use binary codes as a method to store, send and
receive information. UTF-8 (Unicode Transformation Format) as designed to represent
characters and symbols using an 8-bit code. A bit (short for binary digit) is the computer’s
smallest unit of data. An 8-bit code is called a byte.

http://www.sciencefriday.com/wp-content/uploads/2015/08/UTF8-Table-7802.png

Example 1
Suppose we want to convert the word “INTEGER” in a binary code. The
process is to find the corresponding codes of the letters I, N, T, E, G, E, and R.

Solution:
I 01001001 G 01000111
N 01001110 E 01000101
T 01010100 R 01010011
E 01000101

That is, “INTEGER” is read as 01001001 01001110 01010100 01000101


01000111 01000101 01010011.

Thus, the meaning of messages written in binary codes can also be deciphered using
the UTF-8 table.

108
Example 2
Decipher the code:

01001101 01000001 01010100 01001000 01001001 01010011


01000110 01010101 01001110

Solution:
Using the table, we have the message “M A T H I S F U N”

6.3 Conversion between Codes

In writing a number, position of the digits is represented by the powers of the base. For
instance, the decimal number “432” can also be written as “4(10 2) + 3(101) + 2(100)”. Binary
numbers, read from right to left, can also be written using the powers of 2. Numbers such as
“10001” and “10101” may be understood as either decimal or binary, so using a subscript is
important to remove the confusion. Hence, 100012 is in binary while 1000110 is in decimal.

Binary Numbers to Decimal Numbers

To convert binary numbers to decimal numbers, the face value in each position is
multiplied to its corresponding power of 2. This is expressed as:

Example 3:

Convert the following binary numbers to decimal numbers:


a. 101112 b. 11101102 c. 101011102

Solution:

a. 101112 = 1(24) + 0(23) + 1(22) + 1(21) + 1(20)


= 1(16) + 0(8) + 1(4) + 1(2) + 1(1)
= 16 + 0 + 4 + 2 + 1
= 2310

b. 11101102 = 1(26) + 1(25) + 1(24) + 0(23) + 1(22) + 1(21) + 0(20)


= 1(64) + 1(32) + 1(16) + 0(8) + 1(4) + 1(2) + 0(1)
= 64 + 32 + 16 + 0 + 4 + 2 + 0
= 11810

c. 101011102 = 1(27) + 0(26) + 1(25) + 0(24) + 1(23) + 1(22) + 1(21) + 0(20)


= 1(128) + 0(64) + 1(32) + 0(16) + 1(8) + 1(4) + 1(2) + 0(1)
= 128 + 0 + 32 + 0 + 8 + 4 + 2 + 0
= 17410

Decimal Numbers to Binary Numbers

To convert decimal numbers to binary numbers, continuous division by 2’s is used until
the quotient is zero. The resulting remainders represent the binary number. This procedure is
presented below:

109
Example 4

a. Convert the decimal 121 to binary.


Solution:
Place of
Quotient Remainder
Bits
121 60 1 1’s
60 30 0 2’s
30 15 0 4’s
15 7 1 8’s
7 3 1 16’s
3 1 1 32’s
1 0 1 64’s

Thus, 121 in binary is 1111001.

b. Convert the decimal 300 to binary.


Solution:
Place of
Quotient Remainder
Bits
300 150 0 1’s
150 75 0 2’s
75 37 1 4’s
37 18 1 8’s
18 9 0 16’s
9 4 1 32’s
4 2 0 64’s
2 1 0 128’s
1 0 1 256’s

Thus, 300 in binary is 100101100.

c. Convert the decimal 1000 to binary.


Solution:
Place of
Quotient Remainder
Bits
1000 500 0 1’s
500 250 0 2’s
250 125 0 4’s
125 62 1 8’s
62 31 0 16’s
31 15 1 32’s
15 7 1 64’s
7 3 1 128’s
3 1 1 256’s
1 0 1 512’s
Thus, 1000 in binary is 1111101000.

110
Checking may also be done to verify the result by using the process of converting
binary numbers to decimal numbers.
a. 1111001 = 1(26) + 1(25) + 1(24) + 1(23) + 0(22) + 0(21) + 1(20)
= 64 + 32 + 16 + 8 + 0 + 0 + 1
= 121

b. 100101100 = 1(28) + 0(27) + 0(26) + 1(25) + 0(24) + 1(23) + 1(22) + 0(21) + 0(20)
= 256 + 0 + 0 + 32 + 0 + 8 + 4 + 0 + 0
= 300

c. 1111101000 = 1(29) + 1(28) + 1(27) + 1(26) + 1(25) + 0(24) + 1(23) + 0(22) + 0(21) + 0(20)
= 512 + 256 + 128 + 64 + 32 + 0 + 8 + 0 + 0 + 0
= 1000

6.4 Operations on Binary Numbers

Just like in decimal numbers, arithmetic operations can also be performed on binary
numbers.

Binary Number Addition

Adding binary numbers follows the process in adding decimal numbers. However, it
should be noted that only 0 and 1 are used in the binary system. Thus, the sum of 0 and 0 is
0; the sum of 0 and 1 is 1, and the sum of 1 and 1 is 10.

Example 5

a. Find the sum of 1101 and 1010.

Solution:
1
1 1 0 1
1 0 1 0
1 0 1 1 1

Thus, the sum of 1101 and 1010 is 10111.

b. Find the sum of 100011 and 101101.

Solution:
1 1 1 1 1
1 0 0 0 1 1
1 0 1 1 0 1
1 0 1 0 0 0 0

Thus, the sum of 100011 and 101101 is 1010000.

111
c. Find the sum of 1111011 and 1111110.

Solution:
1 1 1 1 1 1
1 1 1 1 0 1 1
1 1 1 1 1 1 0
1 1 1 1 1 0 0 1

Thus, the sum of 1111011 and 1111110 is 11111001.

To check if the result is correct, convert the addends and sum to decimal numbers.

a. 1101 = 1(23) + 1(22) + 0(21) + 1(20) = 13


1010 = 1(23) + 0(22) + 1(21) + 0(20) = 10
10111 = 1(24) + 0(23) + 1(22) + 1(21) + 1(20) = 23

b. 100011 = 1(25) + 0(24) + 0(23) + 0(22) + 1(21) + 1(20) = 35


101101 = 1(25) + 0(24) + 1(23) + 1(22) + 0(21) + 1(20) = 45
1010000= 1(26) + 0(25) + 1(24) + 0(23) + 0(22) + 0(21) + 0(20) = 80

c. 1111011 =1(26) + 1(25) + 1(24) + 1(23) + 0(22) + 1(21) + 1(20) = 123


1111110 =1(26) + 1(25) + 1(24) + 1(23) + 1(22) + 1(21) + 0(20) = 126
11111001=1(27) + 1(26) + 1(25) + 1(24) + 1(23) + 0(22) + 0(21) + 1(20) = 249

Binary Number Subtraction

To subtract binary numbers, the smaller number must be subtracted from the bigger
number. The difference between binary numbers must also be composed of binary digits 0
and 1. The difference of 1 and 1 is 0; the difference of 0 and 0 is 0; 1 subtracted by 0 is 1; and
0 subtracted by 1 is also 0 provided 1 will be borrowed from the next digit of the minuend.

Example 6
a. Subtract 10001 from 11110.

Solution:

1 1 1 (1)0 0 ←1 in the second digit is changed to 0.


1 0 0 0 1
1 1 0 1

Thus, 10001 subtracted from 11110 is 1101.

112
b. Find the difference of 111000 and 100011.

Solution:

1 1 (1)0 (0)1 (0)1 0 ←Note that the borrowing of 1 bit does


not stop until 1 is changed to 0.
1 0 0 0 1 1
1 0 1 0 1

Thus, the difference of 111000 and 100011 is 10101.

To check, conversion of binary numbers to decimal may be done.


a. 11110 = 1(24) + 1(23) + 1(22) + 1(21) + 0(20) = 30
10111 = 1(24) + 0(23) + 0(22) + 0(21) + 1(20) = 17
1101 = 1(23) + 1(22) + 0(21) + 1(20) = 13

b. 111000 = 1(25) + 1(24) + 1(23) + 0(22) + 0(21) + 0(20) = 56


100011 = 1(25) + 0(24) + 0(23) + 0(22) + 1(21) + 1(20) = 35
10101 = 1(24) + 0(23) + 1(22) + 0(21) + 1(20) = 21

Binary Number Multiplication

Multiplying binary numbers is similar to multiplying decimal numbers. The product of 0


and 0 is zero; the product of 0 and 1 is 0; and the product of 1 and 1 is 1.

Example 7
a. Find the product of 1101 and 1011.

Solution:
1 1 0 1
1 0 1 1
1 1 1
1 1 0 1
1 1 0 1
0 0 0 0
1 1 0 1
1 0 0 0 1 1 1 1

Thus, the product of 1101 and 1011 is 10001111.

113
b. Multiply 11011 by 10101.

1 1 0 1 1
1 0 1 0 1
1 1 1 1 1
1 1 0 1 1
0 0 0 0 0
1 1 0 1 1
0 0 0 0 0
1 1 0 1 1
1 0 0 0 1 1 0 1 1 1

Thus, 11011 multiplied by 10101 is 1000110111.

Convert the binary numbers to decimal to verify the result.

a. 1101 = 1(23) + 1(22) + 0(21) + 1(20) = 13


1011 = 1(23) + 0(22) + 1(21) + 1(20) = 11
10001111 = 1(27) + 0(26) + 0(25) + 0(24) + 1(23) + 1(22) + 1(21) + 1(20) = 143

b. 11011 = 1(24) + 1(23) + 0(22) + 1(21) + 1(20) = 27


10101 = 1(24) + 0(23) + 1(22) + 0(21) + 1(20) = 21
1000110111 = 1(29) + 0(28) + 0(27) + 0(26) + 1(25) + 1(24) + 0(23) + 1(22) + 1(21) + 1(20) =
512+32+16+4+1 = 567

Binary Number Division

In dividing binary numbers, the bit length must always be observed. Furthermore, skill
in adding, subtracting and multiplying binary numbers is essential in this operation.

Example 8
a. Divide 10010 by 11.

Solution:
1 1 0
1 1 1 0 0 1 0
1 1
1 1
1 1
0
0
0

114
Division of binary numbers follows the same process in decimal division. It starts by
dividing the leftmost digit of the dividend to the divisor.

The leftmost digit is 1 but 11 does not divide 1, the same with 10. Therefore, 100 is
used to divided resulting to a quotient of 1.

1 is then multiplied to 11 and subtracted to 100, resulting to a difference of 1. Then,


bring down 1 and divide again to 11, resulting to a quotient of 1.

1 is then again multiplied to 11 and subtracted to 11, resulting to a difference of 0.


Then, bring down 0 and be divided to 11, resulting to a quotient of 0.

To check:
10010 = 1(24) + 0(23) + 0(22) + 1(21) + 0(20) = 18
11 = 1(20) + 1(20) = 3
110 1(22) + 1(21) + 0(20) = 6

b. Divide 111000010 by 110.


1 0 0 1 0 1 1
1 1 0 1 1 1 0 0 0 0 1 0
1 1 0
1 0 0 0
1 1 0
1 0 0 1
1 1 0
1 1 0
1 1 0
0

6.5 Errors

Error is a condition when the output information does not match with the input
information. It usually happens during transmission of information through digital signal. During
transmission, digital signals suffer from noise that can introduce errors in the binary bits
travelling from one system to other. That means 0 bit may change to 1 or a 1 bit may change
to 0.

https://www.tutorialspoint.com/computer_logical_organization/images/error.jpg

115
Types of Errors

Bit error occurs when a bit 1 is changed to 0 or a bit 0 is changed to 1.

a. Single Bit Error


Single bit error happens when a bit is differed from the input information to the
output information. It rarely happens in the serial communication system because
noise usually changes more than a bit. It occurs in parallel communication system
wherein the noise will scatter around the lines of the system.

0 1 0 0 1 1

0 1 0 1 1 1

b. Multiple Bit Error


Multiple bit error occurs when two or more bits are changed from the input
information to the output information. It shoud be noted that the position of bit errors
may not be consecutive. This type of error is common in both serial and parallel
communication systems. Change in multiple bits also leads to some degree in
detecting and correcting the errors.

0 1 0 0 1 1

0 1 1 0 0 1

c. Burst Error
Burst error happens when two or more bits are changed in the data
transmission and the error burst is calculated from the first bit change to the last bit
change. It usually occurs in serial communication system wherein the noise may
disturb the sequencing or the positioning of multiple bits. This type of error is
difficult to solve and requires multiple and complex error detecting and correcting
codes.

0 1 0 1 0 1
Burst Error

0 1 1 1 0 0

6.6 Error Detection and Error Correction

Error detection is a process used to verify the correctness of information from the input
data to the output data. This is done by adding redundant bit to the input data then checking
of possible errors in the output data. These redundant bits are used as error detecting codes
to predict an error in the transmission of data.

116
http://ecetutorials.com/digital-electronics/error-detection-and-correction/

Types of Error Detecting Codes

1. Simple Parity Check


In error detection and correction, additional bits are added to the data during
transmission. These additional bits are called parity bits and the data bit forms a code word.
The process is by using an 8-bit code where the most significant bit (MSB) is the parity bit
while the remaining bits are message or data bits. The parity of the 8-bit code can be even
parity or odd parity.

a. Even Parity – Even parity happens when the number of 1’s in a given code is
even.
Example: 10110001, 11100111, 11111111
b. Odd Parity – Odd parity happens when the number of 1’s in a given code is odd.
Example: 10000000, 10001001, 11101111

The parity bit can be either 0 or 1 depending on the required parity. For an even parity,
0 or 1 is used if the entire code has even number of 1’s. For an odd parity, 0 or 1 is used if the
entire code has an odd number of 1’s.

2. Two-Dimensional Parity Check


Parity bits are computed for each row, and for all columns. Then, each computed
parity bit along with the data are transmitted. The output data is then checked using the parity
bits computed.

3. Checksum
Each bit of data in a code are separated into sections. This process uses 1’s
aggregate to get the sum of the sections. The sum is aggregated to get the checksum. The
checksum section is then transmitted together with the data sections. The output data is then
checked using 1’s aggregate to get the sum. The result must be zero to determine the data is
correct.

4. Cyclic Redundancy Check (CRC)


Unlike checksum that uses addition, Cyclic Redundancy Check uses binary division.
Another predetermined binary number adds cyclic redundancy check bits to the data so that
the new data becomes divisible. If same binary number divides the output data, the data is
correct. On the other hand, a result with a remainder is rejected.

117
6.7 Hamming Codes

A set of error-correcting code called Hamming code, developed by R. W. Hamming of


Bell Labs, is used to detect and correct errors in a bit that may happen when digital information
is transmitted or moved.

Like the previous error-detecting codes, Hamming code utilizes the concept of parity
bits, which are additional bits attached to digital data in the process of transmission from input
to output. Furthermore, multiple parity bits are used not just to detect bit errors but also locate
its position in the given code.

Redundant Bits
Extra binary bits, called redundant bits, are generated and attached to the data to make
sure that no bit were lost in the transmission process. The following formula is used to
determine the number of redundant bits:

𝟐𝒓 ≥ 𝒅 + 𝒓 + 𝟏

where r represents the number of redundant bits and d represents the data bit.

The number of redundant bits is done using trial and error method. Thus, the use of
smaller numbers is advised. For instance, the data bit is 5, the number of redundant bits can
be calculated using the formula above. Try 3 for instance.

𝟐𝟑 ≥ 𝟓 + 𝟑 + 𝟏
𝟖≥𝟗

It violates the rule in the formula. Try 4 instead.

𝟐𝟒 ≥ 𝟓 + 𝟒 + 𝟏
𝟏𝟔 ≥ 𝟏𝟎

The result satisfies the formula. Therefore, 4 redundant bits are needed in a data bit of 5.

Calculating the Hamming Code

The key in using Hamming code is the use of extra parity bits to identify a single error.
1. All bit positions that are powers of 2 are marked as parity bits (1, 2, 4, 8, … ). Use
the binary form to represent each power (1, 10, 11, 001, … ).
2. All remaining positions are marked as data bits.
3. Each data bit is uniquely used as set of parity bits using its binary form.
a. Parity bit 1 includes all bit positions whose binary form includes 1 in the least
significant position.
b. Parity bit 2 includes all bit positions whose binary form includes 1 in the second
position from the least significant bit.
c. Parity bit 3 includes all bit positions whose binary form includes 1 in the third
position from the least significant bit.
d. Parity bit 4 includes all bit positions whose binary form includes 1 in the fourth
position from the least significant bit.
e. In general, each parity bit covers all bits where the bitwise and of the parity
position and the bit position is non-zero.
4. Even parity is used in determining the value of parity bits. Use a parity bit of 1 if the
total number of 1’s in the positions checked is odd. Otherwise, use a parity bit of 0.

118
Positioning the Redundant Bits

Using the procedure above, if the data bit is 5, then the number of redundancy bits is
4. Thus, the total number of bits is 9.

9 8 7 6 5 4 3 2 1
1001 1000 111 110 101 100 11 10 1
d9 d8 d7 d6 d5 d4 d3 d2 d1

Redundant Bits
Thus, the new bit representation is:
9 8 7 6 5 4 3 2 1
1001 1000 111 110 101 100 11 10 1
d9 r4 d7 d6 d5 r3 d3 r2 r1

Redundant Bits

Suppose the input data is 11001. The position of the redundancy bits are as follows:
9 8 7 6 5 4 3 2 1
1001 1000 111 110 101 100 11 10 1
1 r4 1 0 0 r3 1 r2 r1

To determine the parity bits:


1. To find r1, check the bit positions of with 1 in the least significant position. Then check
for even parity.

9 8 7 6 5 4 3 2 1
1001 1000 111 110 101 100 11 10 1
1 1 0 0 1 r1
The highlighted bits are bit positions included in parity bit 1. Since the total number of
1’s is odd, then it has a parity bit of 1. Therefore, r1 is 1.

2. To find r2, check the bit positions with 1 in the second position from the least significant
bit. Then check for even parity.
9 8 7 6 5 4 3 2 1
1001 1000 111 110 101 100 11 10 1
1 1 0 0 1 r2
The highlighted bits belongs to parity bit 2. Since the total number of 1’s is even, then
it has a parity bit of 0. Therefore, r2 is 0.

3. To find r3, check the bit positions with 1 in the third position from the least significant
bit. Then check for even parity.
9 8 7 6 5 4 3 2 1
1001 1000 111 110 101 100 11 10 1
1 1 0 0 r3 1
Since the total number of 1’s is odd, then it has a parity bit of 1. Therefore, r3 is 1.

4. To find r4, check the bit positions with 1 in the fourth position from the least significant
bit. Then check for even parity.
9 8 7 6 5 4 3 2 1
1001 1000 111 110 101 100 11 10 1
1 r4 1 0 0 1

119
Since the total number of 1’s is odd, then it has a parity bit of 1. Therefore, r4 is 1.

Thus, the data transmitted is:


9 8 7 6 5 4 3 2 1
1 1 1 0 0 1 1 0 1

120
Exercise 6.1

A. Convert the following:


a. Binary to Decimal
1. 10110 6. 10001111
2. 11011 7. 110011001
3. 101110 8. 1010101010
4. 1011101 9. 1111111111
5. 1110000 10. 10000000001

b. Decimal to Binary
1. 25 6. 555
2. 49 7. 843
3. 101 8. 1000
4. 220 9. 1555
5. 300 10. 7777

B. Perform the indicated operation on binary numbers.


a. Addition
1. 110011 + 101100
2. 1101111 + 1010101
3. 10111000 + 11110010
4. 111100111 + 110101010
5. 1010101010 + 1101100111

b. Subtraction
1. 11001 – 10101
2. 111001 – 110111
3. 1100001 – 1010101
4. 1100111 – 1010001
5. 10101011 - 10011100

c. Multiplication
1. (1011)(101)
2. (1100)(110)
3. (1010)(111)
4. (1111)(1101)
5. (10101)(10111)

d. Division
1. 110011 ÷ 11
2. 1000000 ÷ 100
3. 1111101 ÷ 101
4. 11110000 ÷ 110
5. 1010111100 ÷ 111

121
C. Determine the parities of the following codes.

Code Bit of Odd Parity Bit of Even Parity


1. 1011011
2. 1110001
3. 10110110
4. 101100000
5. 1100110011
6. 10110011101
7. 111101001011
8. 1101110011100
9. 10111111001111
10. 101000111110000

D. Encode the following data in even parity using Hamming code.


1. 1011
2. 1110
3. 10101
4. 11001
5. 101101
6. 1011111
7. 10010111
8. 111100111
9. 101100010
10. 1100110010

1
REFERENCES

Alejan, R. O., et al. (2018). Mathematics in the Modern World. Malabon: Mutya Publishing
House, Inc.
Ariola, M. Q., et al. (2018). Deal with the World of Today through Mathematics. Malabon:
Mutya Publishing House, Inc.
Bluman, Allan G. (2008). Elementary Statistics, A Step by Step Approach. Mc. Graw-Hill
Companies Inc. New York
Error Detection and Correction. (2019). Retrieved from Tutorials Point Web site:
https://www.tutorialspoint.com/computer_logical_organization/error_codes
Error Detection. (2019). Retrieved from Teach Computer Science Web site:
https://teachcomputerscience.com/error-detection/
Navidi, William Cyrus (2006) Statistics for Engineers and Scientists. McGraw-Hill Companies
Inc. New York
Nelson, S. (2018). 5 Reasons why Coding is Important for Young Minds. Retrieved from
Learning Resources - Blog: http://blog.learningresources.com/5reasonskidscoding/
Pandey, H. (2018). Computer Network | Hamming Code. Retrieved from Geeks for Geeks
Web site: https://www.geeksforgeeks.org/computer-network-hamming-code/
Rouse, M. (2010). What is bit (binary digit)? Retrieved from What Is Web site:
https://whatis.techtarget.com/definition/bit-binary-digit
Rouse, M. (2014). Hamming code. Retrieved from WhatIS.com Web site:
https://whatis.techtarget.com/definition/Hamming-code
Sirug, W. S. (2015). Basic Probability and Statistics, Revised Edition. Manila: Minshapers
Co., Inc.
Talents Print. (2018). Number System and Its Types. Retrieved from Talents Print:
https://www.talentsprint.com/blog/2018/01/number-system-i-what-is-number-syste.html
Tutorials Point. (2012). Computer - Number System. Retrieved from Tutorials Point:
https://www.tutorialspoint.com/computer_fundamentals/computer_number_system.htm
Why Is Coding So Important? (2018). Retrieved from Forbes Web site:
https://www.forbes.com/sites/quora/2018/08/16/why-is-coding-so-important/#
17690e5b2 adc
Zorilla, Roland S., Esller, Beda H., Mendoza, Violeta C., Cabrera, Milna K. (2013) Statistics:
Basic Concepts and Applications, Mutya Publishing House, Inc.
http://ecetutorials.com/digital-electronics/error-detection-and-correction/
http://www.sciencefriday.com/wp-content/uploads/2015/08/UTF8-Table-7802.png
https://users.cs.fiu.edu/~downeyt/cop3402/hamming.html
https://www.analyzemath.com/statistics/linear_regression.html
https://www.techopedia.com/definition/5422/data-management
https://stattrek.com/regression/linear-regression.aspx
http://faculty.webster.edu/woolflm/variability.html

You might also like