for Robot Artificial Inteligence

6. Binary code and logic gates

|

Binary Code

  • a modern-day computers are ‘digital machines’ and computer hardware has been designed to handle and process the data only in digital form. every computer system has a microprocessor(CPU - Central processing unit) which acts as brain of computer system. the processor is the main component in a computer system which does all arithmetic(算术) calculations and take logical decisions.

  • the CPU is made-up of millions of tiny components called transistor which are fundamental building block of all digital circuits inside the processor chip.

  • the transisotrs are made up of silicon which is a semiconductor material that can conduct electricity under some conditions but not others, making it a good medium for the control of electrical current.

  • the transisotrs inside the processor ship function as micro switch which can be programmed to be switched on OR switched off. these two states can be easily represented by using binary numbering system which uses only two numbers 0 and 1

  • each microprocessors chip is pre-programmed with instruction set which can intepret program instructions in binary machine code to perform various arithmetic calculations and logical decisions making operations.

  • the term “binary” implies “two.”. thus, the binary number system is a system of numbers based on two possible digits 0 and 1. this is where the string of binary digits come in. each binary digit, or “bit”, is a single 0 or 1, which directly corresponds to a single “switch” in a circuit.

  • therefore, binary number system makes a ideal choice for all computer applications and all the program instruction no matter in which language we write, first must me translated in machines code instructions in binary code(0 and 1)

  • the computer can interpret and execute program instructions only in machine code represented using binary code. the cpu is the main component which performs all arithmetic calculations and takes logical decision.

  • in digital electronics, seven types of logic gates are used for decition making. the logic gates inside the processore are also constructed using transistors.

  • the computer stores all information in binary digital form, which means all data be it text, photographs, audio, video or whatever else is comprised of only collections of ones and zeros.

  • the fundamental builiding block of digital information is the binary digit or bit, which represents a single 0 (zero) or 1 (one) state.

  • all the program code and the data must be represented in the binary form which can be operated upon by the processor and the result of this operation can be sent to either output device(monitor, printer etc) or it can be stored in a permanent storage device.

  • A bit is also sometimes called a flag: this term is most often heard when a bit is used by itself to represent a particular information state. these “flags” are ofen used in networking message formats.

  • the term character is also used to express a set of eight bits. this use comes from the fact that computers often store alphanumeric characters.

Binary Units

  • a bit is considered as smallest unit in computers. 8 bits = 1 byte and 1 bye = 1 character.
  • one bye represents one character such as A, 7, 9 and eight bits that are grouped togeter as a unit(byte)

  • a byte provides enough different combination of 0s and 1s to represent individual characters. for example, the capital letter F is represented by the binary code 01000110 this can be undetstood by the computer system.

Binary code and Logic Gates

  • the logic gates are elementary builidng blocks used in digital electronics to perform logical operations by operating on one or more boolean inputs and produce single binary output.

  • the logic gates operate via tiny hardware component known as a digital switch. in the days of room-size computers, the switches were actually physical siwtches, but the most common type of switch in today’s computers is a transisot known as a MOSFET(Metal-oxide Semiconductor field-effect transisotr)

  • logic gates are pieces of hardware that perforam logical operations on the boolean inputs, allowing us to create complext devices using abstract boolean algebra.

  • logic gates are the fundamental building blocks of hardware and computer processors are made up of billion of tiny logic gates.

  • A logic gate generally has one or two inputs and only one output as a result of the logical operation.

  • all processors work on the same principle. fundamentally they all take signals in the form of 0s and 1s(thus binary signals), manipulate(控制) them according to a set of program instruction and produce output in the form of 0s and 1s.

  • the processor works by reacting to an input of 0s and 1s in specific manner and then returning to an input of 0s and 1s in specific manner and then returning an output based on the decision. the decision itself happens in a circuit called a logic gate, each of which requires at least one transisotr, with the input and outputs arranged differently for different operation.

Boolean algebra

  • in mathematics and mathematical logic, boolean algebra is the branch of algebra in which the values of the variable are the truth values (true and false) and this is usally denoted in binary 1 and 0 respectively

  • Boolean algebra was introduced by George boole in 1854 who was a British mathmatican. Boolean algebra has been fundamental in the developement of digital electornics.

  • in algebra we make use of decimal numbers, whereas the boolean algebra uses truth values, true (1) and false(0).

  • A logic gate is a tiny circuit used in processors for making a logical decision which is based on boolean algebra. boolean algebra is used to analyze and simplify the digital(logic) circuits. it uses only the binary numbers i.e. 0 and 1. it is also called as binary algebra or logical algebra.

  • A logic gate is a physical device that perform as logical operation on one or more logical inputs and produces a only one logical output.

  • the input is the signal or data that fed into a logic gate whereas the output is the result from processing the inputs by using the operation of the logic gate.

  • the input and output can be either high(denoted by 1) Or low(denoted by 0)

  • logic gates are identified by their functions. there are five basic logic gates that are extensively used inside the computer processor.

Comments