Chapter 1.1

김택림·2021년 4월 4일

ComputerScience

목록 보기
1/1

Chapter 1. Data Storage

1.1 Bits and Their Storage

All information is encoded as pattens of 0s and 1s. These digits are called bits(short for binary digits)

l Boolean Operation l

Boolean Operation : Operations that manipulate true/false values

Three of the basic Boolean operations are **AND,OR and XOR**.

The Boolean operation **AND** is designed to reflect the truth or falsness of a statement formed by combining two smaller,or simpler, statements with the conjunction *and*.
Form of such statements : P AND Q
The inputs to the AND operation represent thetruth or falseness of te compound statement's components; the output represents the truth or falseness of the compound statement itself. It is true only when both of its components are true, whereas all other cases should produce an output of 0.

The AND operation

AND 0 1
0 0 0
1 0 1

Form of OR statements : P OR Q
Such statements are true when at least one of their components is true, which agrees with the OR operation.

The OR operation

OR 0 1
0 0 1
1 1 1

Form of XOR statements : P XOR Q
XOR produces an output of 1 when one of its inputs is 1 and the other is 0.

The XOR operation

XOR 0 1
0 0 1
1 1 0

l Gates and Flip-Flops l

Gate(logic gate) : a device that produces the output of a Boolean operation when given the operation's input values (transistors)

image.png

Gates provide the building blocks from which computers are constructed. As a result, Boolean logic and operators apear as fundamental operations in our programming languages.

A flip-flop is a fundamental unit of computer memory. It is circuit that produces an output value of 0 or 1, which remains constant until a pulse from another circuit causes it to shift to the other value.

Purposes in introducing the flip-flop circuit

  • Flip-flop demonstrates how devices can be constructed from gates, a process known as digital circuit design, which is an important topic in computer engineering.
  • The concept of a flip-flop provides an example of abstraction and the use of abstract tools.
  • It is one means of storing a bit within a modern computer.

l Hexadecimal Notation l

stream : a long string of bits
Cause streams are difficult for human mind to comprehend, we usually use a shorthand notation called hexadecimal notation. It takes advantage of the fact that bit patterns within a machine tend to have lengths in multiples of four. To distinguish decimal number and non-decimal number, we will use the common prefix "0x" in front of our hexadecimal numbers.
image.png

1.1 Questions & Exerciese

1. {[0,1,1],[1,0,1]}
2. When we place 1 on the lower input of the flip-flop, it will meet NOT gate. Then, it will change to 0. If one of the input is 0 when the gate is AND, the output is 0. If the output is 1, OR gate's output should be 1. But, inputs of OR gate are 0. So, the output can't be 1. It should be 0.
3. If output was 1, the ouput will remain 1 even if the upper input is temporarily set to 1. If output was 0, the ouput will change to 0 when the upper input is temporarily set to 1.
4. a. OR
b. XOR
5. a. 0x6AF2 b. 0xE85517 c. 0x48
6. a. 0101111111011010111 b. 0110000100001010 c. 1010101111001101 d.0000000100000000
profile
공부하자!

0개의 댓글