\input{header.tex}
\title{Computer Architecture (Sheet \#1)}
\author{Marius Gavrilescu}
\date{}
\maketitle
\begin{enumerate}
\item % 1.
If we ignore the time it takes to write/read data to/from the USB
drive, a pigeon has a data rate of 0.08Gbps. 13 pigeons therefore
have a higher data rate than a direct 1 Gbps Ethernet connection.
\item % 2.
The extra overhead of the circuit switched network is the setup
time, $s$. The extra overhead of the packet switched network is the
delay incurred by store-and-forward: if each node takes $d$ to
buffer the message, then the overhead is $kd$. So packet switching
is faster when $kd < s$.
\item % 3.
There are 22 hops from my computer to CERN according to traceroute,
so the total delay would be 1.1ms, which is insignificant.
For reference, the actual RTT to CERN is 18ms.
\item % 4.
Depends on the checksum. Assuming CRC with a reasonable polynomial,
any one bit error in the payload should fail CRC. If a flag byte is
corrupted, a frame would become longer than intended (and therefore
the checksum will be some garbage after the original end of the
frame), but it is very unlikely the resulting frame would pass CRC.
A one bit error could also create a flag byte in the middle of the
frame, which would make the frame shorter. The resulting frame would
also be very unlikely to pass CRC.
\item % 5.
The main disadvantage is that a damaged frame would be propagated by
such a switch, whereas a store-and-forward switch would drop it.
\item % 6.
If 4 bits in a square are flipped, the error will not be detected.
If 4 bits at random are flipped, the probability they form a square
is
$1\cdot\frac{1}{n}\cdot\frac{1}{k}\cdot\frac{1}{nk}=\frac{1}{n^2k^2}$.
This ignores the possibility of parity bits being flipped.
\item % 7.
If it was placed in the header then the sender would need to buffer
the whole payload, compute the CRC, then send the header and the
payload. By putting it in the trailer it can be computed on-the-fly,
without having to buffer the payload.
\item % 8.
802.3 Manchester encoding is 10 10 10 01 01 01 10 01 10 01 01\\
Diff. Manchester encoding is 01 10 01 01 01 01 10 10 01 01 01
\item % 9.
0111 1110 0000 0010 1111 0000 1010 1111 10001 1111 01111 10111 0111 1110
\item % 10.
Poly is $(x^{10} + x^9 + x^6 + x^3) \operatorname{mod} (x^3 + 1) = (x + 1)$.
If we flip the leftmost bit, the calculation becomes
$(x^9 + x^6 + x^3) \operatorname{mod} (x^3 + 1) = 1$, which is
different from $x + 1$.
\item % 11.
Speed of signal in coax cable is around 2e8 m/s. If we transmit at
10Mbps, 10Mb of signal has length 2e8m. This gives 19m per bit, so
9.77km per minimum length frame. At 1Gbps, this is 100 times
shorter, so 98m per minimum length frame.
\item % 12.
Assume the side of the cube is n units. Then for a single coax cable
we need about one unit per office, so $n^3$ units.
If we had cables from each office to a central switch, the length of
each cable would be the manhattan distance from the center of the
office to (n/2,n/2,n/2). The total amount of cabling is therefore
$\theta(n^4)$.
Hence much less cabling is needed if we use a single long coax cable.
\end{enumerate}
\end{document}