Study Guide
Digital Currency and Blockchain
What it means for money to exist only electronically, and how a blockchain keeps a trustworthy record of who paid whom: a ledger of time-stamped blocks, each linked to the one before it by a hash, so that changing an old record breaks the chain.
Lesson 4.8 Networks, the Internet and Security
For: Cambridge IGCSE Computer Science learners, or anyone who has heard of cryptocurrency and wants to know what the words mean, without advice about buying anything
Stage: Think
The class notebook
A fictional class runs a game with its own pretend money, ClassCoins. Whenever one pupil pays another, the teacher writes a line in a notebook: “Asha pays Ben 5”. Nobody carries real coins. The notebook is the only record of who has what.
Think it through
Overnight, a pupil rubs out “Asha pays Ben 5” and writes “Asha pays Ben 1” instead. How could the class find out that the notebook has been changed? Who should be trusted to keep it?
- Hint 1: What if every pupil had a copy of the notebook?
- Hint 2: What could a page contain that would show an earlier page had been changed?
Show a model answer
Possible answers: compare the notebook with other copies, or make each page contain something worked out from the page before it, so that a change to an old page no longer fits the later ones. The rest of this lesson shows how real systems do both.
Stage: Discover
Money with no coins
In the ClassCoin game you cannot hold a coin. The money is a number against each name in the notebook, and paying someone means changing two numbers.
Think it through
If ClassCoins are only numbers in a record, where does the money exist? What could you do with it that you could not do with coins in a jar?
- Hint 1: Can it be sent to someone far away in a second?
- Hint 2: Could it be copied or lost if the record is lost?
Show what happens
It exists only as records on computers: nothing physical stands for it. That lets it be sent across the world in seconds. It also means that if the record is lost or altered, the money is lost or altered too.
A digital currency is a currency that only exists electronically: there are no notes or coins. It is used to pay for goods and services online, to send money to other people, and to be held in a digital account or wallet until it is spent. Some digital currencies are used inside one company’s game or website. Cryptocurrencies are digital currencies that are not run by one bank or government: their records are kept by a network of computers instead.
This lesson explains how such records work. It gives no advice about buying, selling or holding any currency. Some points are worth knowing: the value of some digital currencies can rise and fall quickly; if someone loses the password or key to their wallet, the money may be impossible to get back; and scammers often use digital currency because payments can be hard to reverse.
Check your understanding
Show the answer
Answer: B. Money that exists only as electronic records, with no coins or notes, and can pay for things.
A digital currency has no physical form: it is electronic records.
Stage: Explain
Who keeps the record?
Think it through
Everything in a digital currency depends on the record of who paid whom. Why is it so important that nobody can quietly change an old line in it?
- Hint 1: Suppose a line said Asha paid Ben 5 and someone changed it to 1.
- Hint 2: Who would gain, and who would lose?
Show a model answer
If an old payment could be changed, someone could make a payment disappear or change an amount, so nobody could rely on the record to say who owns what.
A record of transactions, in the order they happened, is a ledger. The class notebook is a ledger. A bank keeps a ledger of its customers’ money, and everyone trusts it because it is one organisation they know. A digital ledger is a ledger stored electronically.
With a cryptocurrency there is no bank in the middle, so the ledger is a blockchain: its basic form is a digital ledger that is a time-stamped series of records that cannot be altered. A copy is held by many computers, not one, and the way it is built makes a change to an old record show up. The next steps show how.
Check your understanding
Show the answer
Answer: C. It means a changed record on one computer would not match the copies held by the others.
Many copies mean that one changed copy disagrees with all the others.
Stage: Discover
A fingerprint of a page
Every person has fingerprints: a pattern that is the same each time, and different for different people. Suppose each page of the notebook could have a fingerprint of its own, a short code worked out from the words and numbers on it.
Think it through
What would a page’s fingerprint have to do for it to show that the page had been changed? What should happen if one number on the page changes?
- Hint 1: Should the same page always give the same fingerprint?
- Hint 2: Should a changed page give the same fingerprint?
Show what happens
The same page should always give the same fingerprint, and a changed page should give a different one. Then comparing fingerprints shows whether a page has changed.
A hash is exactly that: a code worked out from data by a fixed rule. The same data always gives the same hash, and changing the data gives a different hash. A hash is far shorter than the data it comes from, so it is quick to compare.
Real hashes are worked out by a complicated rule, and are long. To see the idea, here is a rule simple enough to work out by hand. It is not secure, but it behaves in the way that matters:
Multiply the amount by 7. Add the previous block’s hash. Add the block’s number. Keep only the last two digits of the result.
The previous block’s hash is 36 and this is block number 2.
- Multiply the amount by 7. 12 × 7 = 84. The rule says to start with the amount, so that a different amount gives a different result.
- Add the previous block’s hash. 84 + 36 = 120. This links the block to the one before it, which matters in the next step.
- Add the block’s number. 120 + 2 = 122.
- Keep the last two digits. 122 becomes 22. Keeping two digits keeps every hash short.
The hash of block 2 is 22. Using the same rule on the same data always gives 22 again.
Check your understanding
Show the answer
Answer: D. It becomes 52, not 22, and the difference shows that the data has changed.
Changed data gives a different hash, and that difference is the alarm.
Stage: Explain
Blocks linked in a chain
Think it through
How could every page of the notebook be tied to the page before it, so that changing page 2 shows up on pages 3 and 4 as well? Think about what you could write at the top of each page.
- Hint 1: What did the rule use besides the amount?
- Hint 2: What could page 3 carry that depends on page 2?
Show a model answer
Each page can carry the fingerprint of the page before it. If page 2 is changed, its fingerprint changes, and then the copy written at the top of page 3 no longer matches.
In a blockchain, a group of records is stored in a block. Each block holds:
- the records, the transactions;
- a time-stamp, the time the block was made, which puts blocks in order;
- the hash of the previous block;
- its own hash, worked out from everything in the block, including the previous hash.
Because every block contains the hash of the one before it, the blocks form a chain. In our simple example each block holds one transaction.
| Block | Payment | Amount | Previous hash | Hash |
|---|---|---|---|---|
| 1 | Asha pays Ben | 5 | 0 | 36 |
| 2 | Ben pays Chloe | 12 | 36 | 22 |
| 3 | Chloe pays Dev | 8 | ||
| 4 | Dev pays Asha | 20 |
- Use the rule: amount × 7, add the previous hash, add the block number, keep the last two digits.
- A block’s previous hash is the hash of the block before it.
Show the completed table
| Block | Payment | Amount | Previous hash | Hash |
|---|---|---|---|---|
| 1 | Asha pays Ben | 5 | 0 | 36 |
| 2 | Ben pays Chloe | 12 | 36 | 22 |
| 3 | Chloe pays Dev | 8 | 22 | 81 |
| 4 | Dev pays Asha | 20 | 81 | 25 |
Block 1 is the first block, so its previous hash is 0. Blocks 1 and 2 are done for you.
Stage: Predict
Catching a cheat
Someone wants to change block 2 so that Ben paid Chloe 2, not 12. Blocks 3 and 4 have already been added.
Think it through
Using the table above, what do you think happens to block 2’s hash if the amount becomes 2, and what then does not fit in block 3?
- Hint 1: Work out the new hash of block 2 using the rule.
- Hint 2: Look at the previous hash written in block 3.
Show what happens
The new hash of block 2 is 52, not 22. But block 3 has the old value 22 written in it as the previous hash, so block 3 no longer fits block 2: the chain is broken at that link.
| Block | Amount | Previous hash used | Hash worked out now | Hash stored in the next block | Do they match? |
|---|---|---|---|---|---|
| 2 | 2 | 36 | 22 | ||
| 3 | 8 | 52 | 81 |
- Work out the hash again with the changed amount.
- Compare it with the previous hash written in the next block.
Show the completed table
| Block | Amount | Previous hash used | Hash worked out now | Hash stored in the next block | Do they match? |
|---|---|---|---|---|---|
| 2 | 2 | 36 | 52 | 22 | no |
| 3 | 8 | 52 | 11 | 81 | no |
Block 3 is checked after the cheat has also changed its previous hash to match, to see whether that is enough.
The cheat can mend the link by changing block 3, but that breaks the link to block 4, and so on to the end of the chain. Changing one old block means rewriting every block after it. And because many computers hold copies of the chain, the cheat would also need to change every copy, which the others would reject because their copies would disagree.
Apply it
Show the answer
Answer: B. Block 3 holds the old hash of block 2, so it no longer fits it and the chain breaks.
The hash links make every later block depend on every earlier one.
Stage: Explain
Tracking one payment
Think it through
Asha pays Ben 5 ClassCoins through a blockchain. Put the ideas from this lesson in the order you think they happen: the new block is added to the chain; the payment is recorded; the hash of the last block is written into the new block. Explain why that order makes sense.
- Hint 1: A payment has to exist before it can be recorded.
- Hint 2: The new block needs the hash of the one before it, so that must be known first.
Show a model answer
The payment is created first; it is then recorded in a new block, with a time-stamp; the previous block’s hash is written in, and the block’s own hash is worked out; and finally the block is added to the end of the chain.
Each step names who or what acts. The same steps are repeated for every new block.
Asha’s wallet app
Step 1 of 6: The payment is created
Asha asks to pay Ben 5 ClassCoins. The payment names who pays, who is paid and the amount.
The network of computers
Step 2 of 6: The payment is checked
The computers check the ledger to confirm that Asha has at least 5 ClassCoins to spend.
The network of computers
Step 3 of 6: A new block is made
Checked payments are put into a new block, which is given a time-stamp. The hash of the previous block is written into it.
The network of computers
Step 4 of 6: The block’s own hash is worked out
The hash is worked out from everything in the block, including the previous hash, so it depends on the whole history before it.
The network of computers
Step 5 of 6: The block is added to the chain and copied
The block is added to the end of the chain, and the copies held by the other computers are updated to match.
Anyone checking the chain
Step 6 of 6: Later changes are detected
Anyone can work the hashes out again. If an old record has changed, a hash no longer matches the one stored in the next block.
“Cannot be altered” does not mean the data is locked physically. It means that an alteration would be noticed, because of the hash links and the many copies. Nor does a blockchain hide anything: many blockchains are open for anyone to read. It is built to be checked, not to be secret.
Do not confuse: A hash is not encryption
- Goal: privacyEncryption
- Scrambles data with a key so that the key holder can unscramble it again.A card number sent to a ticket website.
- Goal: spotting changeHash
- A short code worked out from data. It is not meant to be turned back into the data; it is compared, to see whether the data has changed.The hash stored in the next block of a chain.
Apply it
Show the answer
Answer: A. Comparing the hash worked out now with the hash stored in the next block.
Comparing hashes shows change; encryption only keeps data private.
Stage: Consolidate
Show what you know
Think it through
Explain to a friend how a blockchain makes it possible to trust a record of payments without a bank in the middle. Use the words ledger, block, time-stamp, hash and chain.
- Hint 1: Say what each block holds.
- Hint 2: Finish with what happens if someone changes an old record.
Show a model answer
A good answer: “A blockchain is a digital ledger made of blocks. Each block holds records, a time-stamp and a hash of the block before it, so the blocks are linked in a chain. If someone changes an old record, its hash changes and no longer matches the one stored in the next block, so the change is noticed. Many computers hold copies of the chain, so one changed copy disagrees with the rest.”
Apply it
Show the answer
Answer: C. 51, because 3 × 7 = 21 and 21 + 25 + 5 = 51, which has two digits already.
3 × 7 = 21; 21 + 25 = 46; 46 + 5 = 51.
Apply it
Show the answer
Answer: C. A blockchain is a time-stamped series of linked records built so that changes to old ones show.
A blockchain is a ledger of linked, time-stamped blocks; a digital currency can use one to record its payments.
- A digital currency exists only electronically, with no notes or coins. It is used to pay for goods and services and to send money to others. The lesson gives no advice about buying or holding any.
- A ledger is a record of transactions in the order they happened. A blockchain is, in its basic form, a digital ledger of time-stamped records that cannot be altered without it showing.
- A hash is a code worked out from data by a fixed rule: the same data gives the same hash, and changed data gives a different one.
- Each block holds records, a time-stamp, the previous block’s hash and its own hash, so blocks form a chain. Changing an old block breaks every link after it, and copies held by many computers would disagree.
- A hash is not encryption: it is used to compare, not to hide.
Sources and scope
- What this lesson is. The eighth lesson of the Networks, the Internet and Security module, written for this site. Its curriculum link is provisional: the wording of the linked specification point has been checked against the published specification, but the link has not been verified by the site owner and implies no endorsement by any examination board. It was written against the Cambridge IGCSE Computer Science 0478 specification for 2026 to 2028.
- Original material. The class notebook and ClassCoins, Asha, Ben, Chloe and Dev, and every amount and hash are fictional and were worked out twice. ClassCoin is not a real currency.
- Simplified on purpose. The hash rule is a toy: real hashes are long, are worked out by far more complicated rules, and cannot realistically be made to match after a change, whereas this toy rule could be fooled. Real blocks hold many transactions, and real systems have rules about who may add a block and how the computers agree on it, which are not taught here. The lesson does not explain how any real digital currency works, nor does it give advice or opinions on whether to use one.
A digital ledger made of time-stamped blocks of records, each linked to the one before it by a hash, so that a change to an old record breaks the chain and shows.
Money that exists only electronically, with no coins or notes, and is used to pay for goods and services or to send value to others.
A code worked out from data by a fixed rule: the same data always gives the same hash, and changing the data changes the hash.
A record of transactions, in the order they happened.
Your progress on this lesson
Saved in this browser only. It is not sent anywhere, does not follow you to another device, and is lost if you clear this site’s data.
This browser is not allowing the site to save progress, so it will be forgotten when you leave the page.