-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/Myyura/the_kai_project
- Loading branch information
Showing
4 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
101 changes: 101 additions & 0 deletions
101
docs/kakomonn/tokyo_university/IST/ci_201608_written_exam_2.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
--- | ||
comments: false | ||
title: 東京大学 情報理工学系研究科 創造情報学専攻 2016年8月実施 筆記試験 第2問 | ||
tags: | ||
- Tokyo-University | ||
--- | ||
# 東京大学 情報理工学系研究科 創造情報学専攻 2016年8月実施 筆記試験 第2問 | ||
|
||
## **Author** | ||
[tomfluff](https://github.com/tomfluff) | ||
|
||
## **Description** | ||
(1) Show the truth table of a half-adder HA (Fig. 1) which outputs 1-bit sum $S$ and 1-bit carry $C$ from two 1-bit binary inputs $A$ and $B$. | ||
|
||
(2) Draw a diagram of the half-adder circuit HA with devices of AND, OR, and NOT. | ||
|
||
(3) Show the truth table of a full-adder FA (Fig. 2) which outputs 1-bit sum $S$ and 1-bit carry $C$ from two 1-bit binary inputs $A$, $B$, and 1-bit carry input $X$. | ||
|
||
(4) Draw a diagram of the full-adder circuit FA using two half-adder HA devices. If necessary, you can use AND, OR, and NOT devices. | ||
|
||
(5) Explain a method to build an n-bit adder for unsigned integers using full-adder FA devices. | ||
|
||
(6) Explain a method to build a faster n-bit adder. | ||
|
||
(7) Explain a method to execute a subtract operation with an n-bit adder through generating negative number in two's complement, and draw its circuit. | ||
|
||
(8) Explain a method to build an n-bit adder-subtractor for unsigned integers with a single n-bit adder and an input signal $F$ to select addition or subtraction, and draw its circuit. | ||
|
||
(9) Explain how to build a multiplier to generate a 2n-bit product $M$ from two n-bit unsigned integers $A$ and $B$. | ||
|
||
<figure style="text-align:center;"> | ||
<img src="https://raw.githubusercontent.com/Myyura/the_kai_project_assets/main/kakomonn/tokyo_university/IST/ci_201608_2_p1.png" width="600" alt=""/> | ||
</figure> | ||
|
||
## **Kai** | ||
### (1) | ||
|
||
|A|B|S|C| | ||
|-|-|-|-| | ||
|0|0|0|0| | ||
|0|1|1|0| | ||
|1|0|1|0| | ||
|1|1|0|1| | ||
|
||
### (2) | ||
|
||
<figure style="text-align:center;"> | ||
<img src="https://raw.githubusercontent.com/Myyura/the_kai_project_assets/main/kakomonn/tokyo_university/IST/ci_201608_2_p2.png" width="280" alt=""/> | ||
</figure> | ||
|
||
### (3) | ||
|
||
|A|B|X|S|C| | ||
|-|-|-|-|-| | ||
|0|0|0|0|0| | ||
|0|0|1|1|0| | ||
|0|1|0|1|0| | ||
|0|1|1|0|1| | ||
|1|0|0|1|0| | ||
|1|0|1|0|1| | ||
|1|1|0|0|1| | ||
|1|1|1|1|1| | ||
|
||
### (4) | ||
|
||
<figure style="text-align:center;"> | ||
<img src="https://raw.githubusercontent.com/Myyura/the_kai_project_assets/main/kakomonn/tokyo_university/IST/ci_201608_2_p3.png" width="310" alt=""/> | ||
</figure> | ||
|
||
### (5) | ||
A method would be to do a bitwise addition for $A=a_0a_1a_2a_3...a_n$ and $B=b_0b_1b_2b_3...b_n$ two unsigned $n$ bit integers. And the carry of each addition would be connected to the `X` input of the following FA. Thus $FA_0$ has `a0,b0,_` as inputs, $FA_1$ has `a1,b1,c0` as inputs and so on. | ||
|
||
### (6) | ||
A faster method would be to build a look-ahead carry adder. This adder basically computes the values with consideration to the carries without calculating the carry and waiting for the result of each pair to calculate the next result. Since each calculation can be expanded to use parameterization without the carry, it is possible to remove internal carries. | ||
|
||
### (7) | ||
Subtraction would be an addition with the negative value. So let's assume we would like to calculate `A-B`, it is the same as computing `A+(-B)`. This means that for subtraction all we need to do is compute the 2's-complement of `B` and add the two numbers together. This can be acomplished by inverting `B` and adding `1` to the `X` (carry) input of the n-bit adder. | ||
|
||
<figure style="text-align:center;"> | ||
<img src="https://raw.githubusercontent.com/Myyura/the_kai_project_assets/main/kakomonn/tokyo_university/IST/ci_201608_2_p4.png" width="320" alt=""/> | ||
</figure> | ||
|
||
*Note: Example uses 4-bit but same drawing is for n-bit.* | ||
|
||
### (8) | ||
A method could be to use `F` as the input to the carry of the n-bit adder. As well as XOR `F` and every bit of `B`. This way, If `F=1` meaning subtraction, `B` will be inverted and 2's complement will be implemented with the adder carry. Otherwise `B` will stay the same and addition will be implemented. | ||
|
||
<figure style="text-align:center;"> | ||
<img src="https://raw.githubusercontent.com/Myyura/the_kai_project_assets/main/kakomonn/tokyo_university/IST/ci_201608_2_p5.png" width="360" alt=""/> | ||
</figure> | ||
|
||
### (9) | ||
A method to compute multiplication would be using full adders and half adders in the following way: | ||
|
||
<figure style="text-align:center;"> | ||
<img src="https://raw.githubusercontent.com/Myyura/the_kai_project_assets/main/kakomonn/tokyo_university/IST/ci_201608_2_p6.png" width="560" alt=""/> | ||
</figure> | ||
|
||
Notice that the Truth Table of bits `a*b` is the same as `a&b`. Avery `bi` is multiplied by the whole of `A` and the solution is added between two consecutive `bi` and `bi+1`. | ||
|
||
This method is very similar to the multiplication algorithm that is being tought in schools. |
50 changes: 50 additions & 0 deletions
50
docs/kakomonn/tokyo_university/IST/ci_201608_written_exam_3.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
comments: false | ||
title: 東京大学 情報理工学系研究科 創造情報学専攻 2016年8月実施 筆記試験 第3問 | ||
tags: | ||
- Tokyo-University | ||
--- | ||
# 東京大学 情報理工学系研究科 創造情報学専攻 2016年8月実施 筆記試験 第3問 | ||
|
||
## **Author** | ||
[tomfluff](https://github.com/tomfluff) | ||
|
||
## **Description** | ||
Select four items out of the following eight items concerning information systems, and explain each item in approximately 4~8 lines of text. | ||
If necessary, use examples or figures. | ||
|
||
1. **Wavelet transformation** | ||
2. **Cepstrum** | ||
3. **Deep Learning** | ||
4. **ZMP (Zero Moment Point)** | ||
5. **SSL (Secure Socket Layer)** | ||
6. **Targeted e-mail attack** | ||
7. **Hough transform** | ||
8. **Lambda expression in computer programming** | ||
|
||
## **Kai** | ||
### Wavelet transformation | ||
In signal processing. The Fourier transform help isolate and recognize stationairy signals. The Short Time Fourier transform uses a rolling window of fixed size to add the time domain to the process and assist with non-stationairy signals. But for STFT a narrow window will have good time resolution but poor frequency resolution, while a wide window will have poor time resolution and good frequency resolution. The Wavelet transform improves on these ideas and uses a wavelet with changable "size" as the basis function. It is possible to change the width and central frequency of the wavelet, i.e. "scaling". | ||
|
||
### Cepstrum | ||
The Cepstrum is essentially the spectrum of the spectrum and is defined generally by $C(x(t))=F^{-1}[log[F(x(t))]]$. Where $F$ is the Fourier transform and $F^{-1}$ is the inverse Fourier transform, for a signal $x(t)$. This concept is used a lot in speech recognition (with the cosign transform to replace Fourier). | ||
|
||
### Deep Learning | ||
Deep learning is a type of machine learning algorithms group which is defined by a neural network type of architecture. This architecture "mimics" the way the human brain works in relation to pattern recognition. Each network in comprised of layers of inner nodes, and uses algorithms such as Backpropogation with relation to an error function for the act of "learning". | ||
|
||
### ZMP (Zero Moment Point) | ||
(Also explained for 2014-Summer exam) | ||
|
||
The ZMP is a concept which is used in robotics and especially with walk/run/jump actions. For a stable body it needs $velocity=0$ but on top of that it also needs $momentum=0$. Meaning, that the inertia of the body is 0, otherwise it would develop speed. The ZMP is the point with relation to the center of mass (CoM) which would give zero momentum and make the body stable. | ||
|
||
### SSL (Secure Socket Layer) | ||
In networking, SSL is a security mechanism which enables an encrypted connection between a client and a server. It works by a mutual "handshake" between the client and the server through authentication of certificates. The connection itself is using the public-key private-key encryption (prime numbers and modulation) to encrypt the communication. | ||
|
||
### Targeted e-mail attack | ||
Targeted email attack is an attack which the attacker targets though the email channel, and tries to persuade a victim to run specific actions. Some actions could be: opening a link, downloading an attachment or installing software. The motives behind such attacks could be stealing information, gaining control of the target machine and more. | ||
|
||
### Hough transform | ||
The Hough transform is used in computer vision in regards to edge/shape detection. It is a very powerful algorithm which is insensitive to noise and disconnected lines/edges. This algorithm works in another parameter space which is not the image space and uses "voting" over a vote matrix to determine the edges. In the general case, given the $\phi$ table of a shape we can detect this shape in an image. | ||
|
||
### Lambda expression in computer programming | ||
In programming languages `lambda expressions` are a tool used to define inline functions. These functions do not need to have headers and are defined inline. An example for one use of lambda expression could be when a sorting algorithm requires a function which given two objects outputs `-1,0,1` depending on which is larger. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters