Learning-Material-in Math
Learning-Material-in Math
Learning Outcomes:
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
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
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
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%
Exercise 5.1
1 2000 6% 1 year
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.
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.
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.
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:
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.
1 2000 6% 1 year
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).
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.
96
A = P + I = 1025.16 + 12.81 = 1037.97
A = P(1 + rt)
A = 500[1 + 0.06(6/12)]
A = 515
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
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
No. Principal (P) Rate (r) mode Time (t) Amount (A)
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?
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.
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.
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.
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.
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 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.
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.
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.
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:
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.
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
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.
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.
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.
Then find the mortgage by subtracting the downpayment from the selling price.
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%.
Solution:
Downpayment = 20% of P392,000 = 78,400
The downpayment is P78,400.
104
= 313, 600
Hence, the mortgage is P313,600.
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.
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
Exercise 5.5
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:
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.
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
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
Thus, the meaning of messages written in binary codes can also be deciphered using
the UTF-8 table.
108
Example 2
Decipher the code:
Solution:
Using the table, we have the message “M A T H I S F U N”
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.
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:
Solution:
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
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
Just like in decimal numbers, arithmetic operations can also be performed on binary
numbers.
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
Solution:
1
1 1 0 1
1 0 1 0
1 0 1 1 1
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
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
To check if the result is correct, convert the addends and sum to decimal numbers.
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:
112
b. Find the difference of 111000 and 100011.
Solution:
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
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
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.
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
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
0 1 0 0 1 1
0 1 0 1 1 1
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
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/
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.
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.
117
6.7 Hamming Codes
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.
𝟐𝟑 ≥ 𝟓 + 𝟑 + 𝟏
𝟖≥𝟗
𝟐𝟒 ≥ 𝟓 + 𝟒 + 𝟏
𝟏𝟔 ≥ 𝟏𝟎
The result satisfies the formula. Therefore, 4 redundant bits are needed in a data bit of 5.
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
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.
120
Exercise 6.1
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. 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.
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