Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
Submit HW1
Browse files Browse the repository at this point in the history
  • Loading branch information
hanggrian committed Jun 7, 2023
1 parent d11d49b commit e0a8540
Show file tree
Hide file tree
Showing 7 changed files with 630 additions and 50 deletions.
159 changes: 130 additions & 29 deletions assignments/hw1.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
> We would like to send 4 bits per level of a digital signal. How many signal
level are needed?

**Using [digital signals](https://github.com/hendraanggrian/IIT-CS455/blob/main/signal.md#digital-signals)**:
**Using [digital signals](https://github.com/hendraanggrian/IIT-CS455/blob/main/signals.md#digital-signals)**:

$$
\begin{array}{rcl}
Expand All @@ -31,39 +31,27 @@ $$
\end{array}
$$

Represented as:

| # | Binary | Decimal |
| ---: | --- | --- |
| 1 | `0000` | 0 |
| 2 | `0001` | 1 |
| 3 | `0010` | 2 |
| 4 | `0011` | 3 |
| 5 | `0100` | 4 |
| 6 | `0101` | 5 |
| 7 | `0110` | 6 |
| 8 | `0111` | 7 |
| 9 | `1000` | 8 |
| 10 | `1001` | 9 |
| 11 | `1010` | 10 |
| 12 | `1011` | 11 |
| 13 | `1100` | 12 |
| 14 | `1101` | 13 |
| 15 | `1110` | 14 |
| 16 | `1111` | 15 |
Illustrated as:

| Binary | Decimal | Binary | Decimal | Binary | Decimal | Binary | Decimal |
| ---: | :--- | ---: | :--- | ---: | :--- | ---: | :--- |
| `0000` | 0 | `0100` | 4 | `1000` | 8 | `1100` | 12 |
| `0001` | 1 | `0101` | 5 | `1001` | 9 | `1101` | 13 |
| `0010` | 2 | `0110` | 6 | `1010` | 10 | `1110` | 14 |
| `0011` | 3 | `0111` | 7 | `1011` | 11 | `1111` | 15 |

## Problem 3

> A computer monitor has the resolution of $1200 \times 1000$ pixels. If each
pixel uses $1026$ colors, how many bits are needed to send the complete
contents of a screen?

**Using [bit rate](https://github.com/hendraanggrian/IIT-CS455/blob/main/signal.md#bit-rate)**:
**Using [bit rate](https://github.com/hendraanggrian/IIT-CS455/blob/main/signals.md#bit-rate)**:

$$
\begin{array}{rcl}
B & = & F . W . H . P \\\\
& = & 1,200 \times 1,000 \times \log_{2}{1,026} \\\\
B & = & F . R . P \\\\
& = & 1 \times 1,200 \times 1,000 \times \log_{2}{1,026} \\\\
& = & \bf 12,000,000,000 \sf \ bits
\end{array}
$$
Expand All @@ -75,13 +63,35 @@ $$
for the superposition of two such sine waves $f(t) = s(t) + s(t)$ and draw its
time and frequency domain plots ($t$ denotes time).

**Using [sine waves](https://github.com/hendraanggrian/IIT-CS455/blob/main/signals.md#sine-waves)**:

$$
\begin{array}{rcl}
S & = & \displaystyle A . \sin(\frac{2 \pi}P + \alpha) \\\\
& = & 10 \times \sin(\frac{2 \pi}{0.1} + \pi/2)
\end{array}
$$

$$
\begin{array}{rcl}
F & = & 2S \\\\
& = & 10 \times \sin(\frac{2 \pi}{0.1} + \pi/2) + 10 \times \sin(\frac{2 \pi}{0.1} + \pi/2) \\\\
& = & \bf 20 \times \sin(\frac{2 \pi}{0.1} + \pi/2)
\end{array}
$$

Illustrated as:

![](https://github.com/hendraanggrian/IIT-CS455/raw/assets/lines/hw1_analog.png)

## Problem 5

> What are the disadvantages of the baseband transmission of a digital signal?

- Limited bandwidth — Digital signals need to be approximated with analog
signals in case of limited bandwidth.
- High interference — More susceptible to noises compared to modulation.
- Short distance — Requires extra equipments to amplify.

## Problem 6

Expand All @@ -91,6 +101,31 @@ $$
C = B \frac{SNR_{dB}}{3}
$$
**Using [noise](https://github.com/hendraanggrian/IIT-CS455/blob/main/signals.md#noise)**:

$$
\begin{array}{rcl}
SNR_{dB} & = & 10 . \log_{10}{SNR} \\\\
\frac{SNR_{dB}}{10} & = & \log_{10}{SNR}
\end{array}
$$

**Using [Shannon capacity](https://github.com/hendraanggrian/IIT-CS455/blob/main/signals.md#noisy-channel-shannon-capacity)**:

$$
C = B . \log_2{(1 + SNR)}
$$

When $SNR$ is very high, we can simplify $1+SNR$.

$$
\begin{array}{rcl}
\log_2{SNR} & = & \log_{10}{SNR} / \log_{10}2 \\\\
& = & \frac{SNR_{dB}}{10} / \log_{10}2 \\\\
& = & SNR_{dB} / 10 . \log_{10}2 \\\\
& = & \bf \displaystyle \frac{SNR_{dB}}3
\end{array}
$$


## Problem 7
Expand All @@ -102,41 +137,107 @@ $$
is amplified by $15$ dB. The power of the signal at the source $A$ is $1$ mW.
What is the power of the signal at the destination $D$?

**Using [amplification](https://github.com/hendraanggrian/IIT-CS455/blob/main/signals.md#amplification)** A → B:

$$
\begin{array}{rcl}
P_2 & = & P_1 . 10^{G / 10} \\\\
& = & 1 \times 10^{10 / 10} \\\\
& = & \bf 10 \sf \ mW
\end{array}
$$

**Using [attenuation](https://github.com/hendraanggrian/IIT-CS455/blob/main/signals.md#attenuation)** B → C:

$$
\begin{array}{rcl}
P_3 & = & P_2 . 10^{G / 10} \\\\
& = & 10 \times 10^{-(0.5 \times 10) / 10} \\\\
& = & 10 \times 10^{-5 / 10} \\\\
& = & \bf 3.16 \sf \ mW
\end{array}
$$

**Using amplification** C → D:

$$
\begin{array}{rcl}
P_4 & = & P_3 . 10^{G / 10} \\\\
& = & 3.16 \times 10^{15 / 10} \\\\
& = & \bf 99.92 \sf \ mW
\end{array}
$$

## Problem 8

> Define a DC component and its effect on digital transmission.
DC component is constant voltage in a signal that presents a problem in some
scenarios:

- A system that can **not** transmit low frequencies.
- A system that uses electrical coupling via a transformer.

## Problem 9

> What is the role of a header added to a data unit in the OSI network model?
The roles of **network layer** in OSI model are:

- Logical addressing
- Routing
- Internetworking
- Packetizing
- Fragmentation
- Address resolution

## Problem 10

> What is the difference between a logical address and a physical address?

Logical addressing in **network layer** refers to assigned address like IP
address. While physical addressing in **data link layer** are attached to
hardware like MAC address.

## Problem 11

> What is the total delay for a file of $2.5$ million bytes that is being sent
over a link with a router having queuing time of $2$ microseconds and
processing time of $1$ microsecond. The length of the link is $1000$ km. The
speed of the signal is $2 \times 108$ m/s. The link has a bandwidth of $5$
processing time of $1$ microsecond. The length of the link is $1,000$ km. The
speed of the signal is $2 \times 10^8$ m/s. The link has a bandwidth of $5$
Mbps. Which component of this delay is dominant? Which one is negligible?

**Using [propagation time](https://github.com/hendraanggrian/IIT-CS455/blob/main/signals.md#propagation-time)**:

$$
\begin{array}{rcl}
PT & = & \displaystyle \frac{D}{PS} \\\\
& = & \frac{1,000 \textsf{ km}}{(2*10^8) \textsf{ m/s}} \\\\
& = & \frac{1,000,000,000 \textsf{ cm}}{200,000,000 \textsf{ m/s}} \\\\
& = & \bf 5 \sf \ ms
\end{array}
$$

**Using [transmission time](https://github.com/hendraanggrian/IIT-CS455/blob/main/signals.md#transmission-time)**:

$$
\begin{array}{rcl}
TT & = & \displaystyle \frac{MS}{B} \\\\
& = & \frac{2.5 \textsf{ Mb} \times 8}{5 \textsf{ Mbps}} \\\\
& = & \frac{20 \textsf{ Mb}}{5 \textsf{ Mbps}} \\\\
& = & \bf 4 \sf \ s
\end{array}
$$

Therefore, **propagation time is negligible**.

## Problem 12

> The data input stream is `01001011`. Draw a figure presenting the output from:
>
> 1. AMI encoder
> 2. differential Manchester encoder
> 2. Differential Manchester encoder
![](https://github.com/hendraanggrian/IIT-CS455/raw/assets/lines/hw1_digital.png)

[View full graph](https://github.com/hendraanggrian/IIT-CS455/blob/main/lines/hw1.drawio)
14 changes: 7 additions & 7 deletions internet.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ Hunders of thousands of interconnected networks.

## ISP

The national Internet Service Providers (ISP) are backbone networks created and
maintained by specialized companies. To provide connectivity between end users,
these backbone networks are connected by complex switching stations called
Network Access Points (NAPs).
The national *Internet Service Providers (ISP)* are backbone networks created
and maintained by specialized companies. To provide connectivity between end
users, these backbone networks are connected by complex switching stations
called *Network Access Points (NAPs)*.

| Coverage | Note |
| Coverage | Description |
| --- | --- |
| Regional ISP | Smaller ISPs that are connected to one or more national ISPs. |
| Local ISP | Provide direct service to the end users. They can be connected to regional ISPs or directly to national ISPs. |
| Regional | Smaller ISPs that are connected to one or more national ISPs. |
| Local | Provide direct service to the end users. They can be connected to regional ISPs or directly to national ISPs. |

## Layers

Expand Down
94 changes: 94 additions & 0 deletions lines/encoding.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<mxfile host="Electron" modified="2023-06-07T00:49:13.101Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.2.8 Chrome/112.0.5615.165 Electron/24.2.0 Safari/537.36" etag="iHjdkFdL_Lp20HniP3bv" version="21.2.8" type="device" pages="4">
<diagram name="m_0" id="Pfz8JsvBTpIeq38Xa1Xd">
<mxGraphModel dx="474" dy="782" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="60" pageHeight="60" math="0" shadow="0">
<root>
<mxCell id="WXZpVR0zL4GNG9rHUEMz-0" />
<mxCell id="WXZpVR0zL4GNG9rHUEMz-1" parent="WXZpVR0zL4GNG9rHUEMz-0" />
<mxCell id="WXZpVR0zL4GNG9rHUEMz-2" value="" style="endArrow=none;html=1;rounded=0;edgeStyle=orthogonalEdgeStyle;fillColor=#d80073;strokeColor=#D80073;strokeWidth=3;" parent="WXZpVR0zL4GNG9rHUEMz-1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="50" y="50" as="sourcePoint" />
<mxPoint x="10" y="10" as="targetPoint" />
<Array as="points">
<mxPoint x="30" y="50" />
<mxPoint x="30" y="10" />
</Array>
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram name="m_1" id="stlAzpkCwH3hcmDchZL8">
<mxGraphModel dx="474" dy="782" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="60" pageHeight="60" math="0" shadow="0">
<root>
<mxCell id="more9FAv4938b5YkPjJd-0" />
<mxCell id="more9FAv4938b5YkPjJd-1" parent="more9FAv4938b5YkPjJd-0" />
<mxCell id="more9FAv4938b5YkPjJd-2" value="" style="endArrow=none;html=1;rounded=0;edgeStyle=orthogonalEdgeStyle;fillColor=#d80073;strokeColor=#D80073;strokeWidth=3;" parent="more9FAv4938b5YkPjJd-1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="50" y="10" as="sourcePoint" />
<mxPoint x="10" y="50" as="targetPoint" />
<Array as="points">
<mxPoint x="30" y="10" />
<mxPoint x="30" y="50" />
</Array>
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram name="dm_0" id="3XLVzkfQfDHE3ebzAdC8">
<mxGraphModel dx="474" dy="782" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="120" pageHeight="60" math="0" shadow="0">
<root>
<mxCell id="vKDws1JHi0dLaeFv_vwQ-0" />
<mxCell id="vKDws1JHi0dLaeFv_vwQ-1" parent="vKDws1JHi0dLaeFv_vwQ-0" />
<mxCell id="vKDws1JHi0dLaeFv_vwQ-2" value="" style="endArrow=none;html=1;rounded=0;edgeStyle=orthogonalEdgeStyle;fillColor=#d80073;strokeColor=#D80073;strokeWidth=3;" parent="vKDws1JHi0dLaeFv_vwQ-1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="50" y="50" as="sourcePoint" />
<mxPoint x="10" y="50" as="targetPoint" />
<Array as="points">
<mxPoint x="30" y="50" />
<mxPoint x="30" y="10" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="nic5twBk-I7aev4hS8BO-0" value="" style="endArrow=none;html=1;rounded=0;edgeStyle=orthogonalEdgeStyle;fillColor=#d80073;strokeColor=#D80073;strokeWidth=3;" parent="vKDws1JHi0dLaeFv_vwQ-1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="110" y="10" as="sourcePoint" />
<mxPoint x="70" y="10" as="targetPoint" />
<Array as="points">
<mxPoint x="90" y="10" />
<mxPoint x="90" y="50" />
</Array>
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram name="dm_1" id="Obrwm-g0ql8PevJUpVmq">
<mxGraphModel dx="474" dy="782" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="120" pageHeight="60" math="0" shadow="0">
<root>
<mxCell id="dEH7iSopxsQTSnt5TMeI-0" />
<mxCell id="dEH7iSopxsQTSnt5TMeI-1" parent="dEH7iSopxsQTSnt5TMeI-0" />
<mxCell id="6Xy3UBjJL4OkeNRxW-V8-0" value="" style="endArrow=none;html=1;rounded=0;edgeStyle=orthogonalEdgeStyle;fillColor=#d80073;strokeColor=#D80073;strokeWidth=3;" parent="dEH7iSopxsQTSnt5TMeI-1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="50" y="50" as="sourcePoint" />
<mxPoint x="10" y="10" as="targetPoint" />
<Array as="points">
<mxPoint x="30" y="50" />
<mxPoint x="30" y="10" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="6Xy3UBjJL4OkeNRxW-V8-1" value="" style="endArrow=none;html=1;rounded=0;edgeStyle=orthogonalEdgeStyle;fillColor=#d80073;strokeColor=#D80073;strokeWidth=3;" parent="dEH7iSopxsQTSnt5TMeI-1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="110" y="10" as="sourcePoint" />
<mxPoint x="70" y="50" as="targetPoint" />
<Array as="points">
<mxPoint x="90" y="10" />
<mxPoint x="90" y="50" />
</Array>
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Loading

0 comments on commit e0a8540

Please sign in to comment.