Skip to content

Commit b9062ca

Browse files
committed
Apply suggestions
1 parent 9c3ba89 commit b9062ca

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed
Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Instructions
22

3+
Your job is to help implement the message sequencer to calculate the transmission sequence and the decoder for receiving messages.
4+
35
A parity bit is simple way of detecting transmission errors.
4-
The transmitters and receives can only transmit and receive _exactly_ eight bits at a time (including the parity bit).
6+
The transmitters and receivers can only transmit and receive _exactly_ eight bits at a time (including the parity bit).
57
The parity bit is set so that there is an _even_ number 1s in each transmission and is always the first bit from the right.
68
So if the receiver receives `11000001`, `01110101` or `01000000` (i.e. a transmission with an odd number of 1 bits), it knows there is an error.
79

@@ -18,35 +20,36 @@ A parity bit must then be inserted after every seven bits of data:
1820
↑ ↑ ↑ ↑ (7th bits)
1921
```
2022

21-
So transmission sequence for this message looks like this:
23+
The transmission sequence for this message looks like this:
2224

2325
```text
24-
1100000_ │ 0000000_ │ 0111000_ │ 0001101_ │ 1110
25-
↑ ↑ ↑ ↑ (parity bit locations)
26+
1st │ 2nd │ 3rd │ 4th │ 5th
27+
transmission │ transmission │ transmission │ transmission │ transmission
28+
│ │ │ │
29+
1100000_ │ 0000000_ │ 0111000_ │ 0001101_ │ 1110
30+
↑ ↑ ↑ ↑ (parity bit locations)
2631
```
2732

2833
The data in the first transmission in the sequence (`1100000`) has two 1 bits (an even number), so the parity bit is 0.
2934
The first transmission becomes `11000000` (or `C0` in hex).
3035

31-
The data in the next transmission (`0000000`) has none (an even number again), so the parity bit is 0 again.
32-
The second transmission becomes `00000000` (or `00` in hex).
36+
The data in the next transmission (`0000000`) has zero 1 bits (an even number again), so the parity bit is 0 again.
37+
The second transmission thus becomes `00000000` (or `00` in hex).
3338

3439
The data for the next two transmissions (`0111000` and `0001101`) have three 1 bits.
3540
Their parity bits are set to 1 so that they have an even number of 1 bits in the transmission.
3641
They are transmitted as `01110001` and `00011011` (or `71` and `1B` in hex).
3742

3843
The last transmission (`1110`) has only four bits of data.
39-
Since exactly eight bits are transmitted at a time and the parity bit is the right most bit, three 0 bits and then the parity bit is added to make up eight bits.
44+
Since exactly eight bits are transmitted at a time and the parity bit is the right most bit, three 0 bits and then the parity bit are added to make up eight bits.
4045
It now looks like this (where `_` is the parity bit):
4146

4247
```text
4348
1110 000_
4449
↑↑↑ (added 0 bits)
4550
```
4651

47-
There is an odd number of 1 bits again, so the parity bit is to 1.
52+
There is an odd number of 1 bits again, so the parity bit is 1.
4853
The last transmission in the sequence becomes `11100001` (or `E1` in hex).
4954

50-
The entire transmission sequence for this message then `11000000 00000000 01110001 00011011 11100001` (or `C0 00 71 1B E1` in hex).
51-
52-
Your job is to help implement the message sequencer to calculate the transmission sequence and the decoder for receiving messages.
55+
The entire transmission sequence for this message is `11000000 00000000 01110001 00011011 11100001` (or `C0 00 71 1B E1` in hex).

exercises/intergalactic-transmission/introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Now imagine the consequences:
1010
- Losing contact with the Kepler Whirl system when "save new worm hole" becomes "cave new worm hole".
1111
- Or plunging the universe into existential horror by replacing a cowboy emoji 🤠 with a clown emoji 🤡.
1212

13-
Detecting corrupted messages isn’t just important — its critical.
14-
The receiver must know when something has gone wrong before disaster strikes.
13+
Detecting corrupted messages isn’t just important — it's critical.
14+
The receiver _must_ know when something has gone wrong before disaster strikes.
1515

1616
But how?
1717
Scientists and engineers from across the universe have been battling this problem for eons.

0 commit comments

Comments
 (0)