Some Basics of The Data Storage
Hello to everyone,
First of all, I can say that I am more new in computer science. But I’ve always wondered how computers encode and store information, and the underlying processes underlying many other processes. For example, I think you have seen 0s and 1s in many sci-fi movies and wondered. This is exactly what I wanted to convey to you, as far as I learned. I hope it will be effective.
CHAPTER 1
I think some basic knowledge should be learned in order to better understand computer science. For example, before we learn to code, we need to know how information is encoded and stored in the computer.
There are computer’s data storage devices. Our first step is to know the basics of these devices and then to consider how information is encoded for storage in these systems.
Bits and Their Storage
Inside today’s computers information is encoded as patterns of 0s and 1s. These digits are called bits(short for binary digits). Patterns of bits are really only symbols whose meaning depends on the application. For instance, sometimes they are used to represent numeric values; sometimes they represent characters in an alphabet and punctuation marks; sometimes they represent sounds; and sometimes they represent images.
Boolean Operations
If you want to understand how individual bits are stored and manipulated inside a computer, it is convenient to imagine that the bit 0 represents the value false and the bit 1 represents the value true. Operations that manipulate true/false values are called Boolean operations, in honor of the mathematician George Boole(1815–1864), who was a pioneer in the field of mathematics called logic.
Three of the basic Boolean operations are AND, OR and XOR(exclusive or). Actually, these operations are similar to the arithmetic operations TIMES and PLUS because they combine a pair of values(the operation’s input) to produce a third value(the output).
The Boolean Operation AND is designed to reflect the truth or falseness of a statement formed by combining two smaller ,or simpler,statements with the conjuction and.
✔ J AND Q
where J represents one statement , and Q represents another — for example,
English is an international language AND London is the capital city of U.K.
The inputs represent the truth or falseness of the compound statement’s components; the output represents the truth or falseness of the compound statement itself. If J AND Q is true only when both of its components are true,we conclude that 1 AND 1 should be 1, whereas all other cases should produce an output of 0.
Let’s look at the OR operator.
I want to continue by giving an example.I think it’s more understandable and more fun that way.
✔ J OR Q
where,again, P represents one statement and Q represents another. Such statements are true when at least one of their components is true. So 1 of 1 is enough for truth :)
There is not a single conjuction in the English language that captures the meaning of the XOR operation. XOR produces an output of 1(true) when one of its inputs is 1 annd the other is 0. For example,
✔ J XOR Q means “either J or Q but not both.” (In short , the XOR operation produces an output of 1 when its inputs are different.)
The operation NOT is another Boolean operation, but it is different from other operations because of that it has only one input. Its output is the opposite of that input.
GATES
First of all, let’s make the definition of the gate. Gate is a device that computes a Boolean operation. Gates are often implemented as small electronic circuits called transistors.
Flip-flops
A flip-flop is a fundamental unit of computer memory. It is a 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.
- One input line is used to set its stored value to 1
- One input line is used to set its stored value to
- While both input lines are 0, the most recently stored value is preserved.
Let’s think about that what is the purpose of this circuit. Firstly,it demonstrates how devices can be constructed from gates, a process known as digital circuit design, which is an important topic in computer engineering. Second, the concept of a flip-flop provides an example of abstraction and the use of abstract tools. A computer engineer does not need to know which circuit is actually used within a flip-flop. Instead, only an understanding of the flip-flop’s external properties is needed to use it as an abstract tool.Third purpose of the flip-flop is that it is one means of storing a bit within a modern computer. More precisely, a flip-flop can be set to have the output value of either 0 or 1 . Other circuits can adjust this value by sending pulses to the flip-flop’s inputs, and still other circuits can respond to the stored value by using flip-flop ‘s output as their inputs. Thus, many flip-flops, constructed as very small electrical circuits, can bu used inside a computer as a means of recording information that is encoded as patterns of 0s and 1s.
Having mentioned this much, I want to say this last. My curiosity about these bit models started in the movie transcendence. I think your curiosity and interest will increase more if you have the opportunity to watch it. I strongly recommend you to watch :)
Reference: Computer Science : An Overview :Global Edition(12th Edition)