original bits: 1 1 0 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 0
decoded bits: 1 1 0 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0
^
The receiver expects the marked bit is 0 because it does not see the required bit stuffing in the preceding six 1s. Thus, it can detect the error.
1 1 0 1 0 1 1 1 1 1 0 1 1 0 1 0 1 1 1 1 1 0 1 0 1 0 1 1 1 1 1 0 1 1 0
11000001
---------------
1001 | 11011001000
1001
--------------
1001
1001
--------------
1000
1001
--------------
1 (remainder)
So, the message is 11011001001.
1010011
---------------
1001 | 01011001001
1001
--------------
1000
1001
--------------
1100
1001
--------------
1011
1001
--------------
10 (remainder)
Thus, the receiver detects that an error has occurred because the remainder is not a zero.
Forwarding table for B1:
| Destination | Outgoing Port |
| A | A |
| C | B2 |
| D |
Forwarding table for B2:
| Destination | Outgoing Port |
| A | B1 |
| C | B3 |
| D | B4 |
Forwarding table for B3:
| Destination | Outgoing Port |
| A | B2 |
| C | C |
| D | B2 |
Forwarding table for B4:
| Destination | Outgoing Port |
| A | B2 |
| C | |
| D | D |