بسم الله الرحمن الرحیم

سخت افزار-hardware

فهرست علوم
علوم کامپیوتر
هوش مصنوعي
هوش ضعیف رفتارمحور-هوش قوی پایه محور-هوش قوی اشراق‌محور


به اجزاء فیزیکی قابل لمس رایانه سخت‌افزار رایانه (به انگلیسی: Computer Hardware) گفته می‌شود. بسیاری از این اجزاء خود از اجزاء الکترونیکی یا الکترومکانیکی تشکیل شده‌اند.[۱][۲]

سخت‌افزار رایانه در واقع همان قسمت‌ها یا اجزای فیزیکیِ رایانه مانند نمایشگر، موشواره، صفحه‌کلید، دیسک سخت، واحد سامانه (کارت‌های گرافیک، کارت‌های صدا، حافظه اصلی، مادِربورد و تراشه‌های دیگر) و… هستند.[۳][۴][۵]

بسیاری از اجزای سخت‌افزار رایانه برای به‌کار آمدن نیاز به بخش غیرقابل لمس و غیر فیزیکی یعنی نرم‌افزار دارند. برای استفاده و فرمان دادن به رایانه می بایست با استفاده از نرم افزار از سخت‌افزارهای موجود در یک رایانه استفاده کرد. در مقابل، نرم‌افزار دسته ای از مجموعه دستورالعمل‌های قابل فهم برای ماشین است که به پردازنده مرکزی امر می‌کند تا اعمال خاصی را انجام دهد. ترکیب نرم‌افزار و سخت‌افزار یک سامانه رایانه قابل استفاده را به‌وجود می‌آورند.[۶]

سخت افزار یکی از بخش‌های علوم رایانه است که در کسب و کارهای مختلف با مدرک کامپ‌تیا اِی پلاس (به انگلیسی: +CompTIA A) شناخته می‌شود.[۷]

معماری فون نویمان

الگوی ساخت تمام رایانه‌های امروزی معماری فون نویمان است. این معماری برای اولین بار در گزارشی به قلم ریاضی‌دان مجارستانی، جان فون نویمان در سال ۱۹۴۵ توضیح داده شد. معماری فون نویمان روش طراحی یک رایانه دیجیتال را با تقسیم آن به واحد پردازنده مرکزی، حافظهٔ اصلی، حافظه‌های ذخیره‌سازی انبوه و ساز و کارهای ورودی/خروجی شرح می‌دهد.[۸] در این تقسیم‌بندی واحد پردازنده مرکزی شامل واحد محاسبه و منطق، ثبات‌ها و یک واحد کنترل (شامل ثبات شمارنده برنامه، ثبات دستورالعمل و …) است. حافظهٔ اصلی نیز برای ذخیره‌سازی دادهها و دستورالعامل‌ها مورد استفاده قرار می‌گیرد.[۸]

مفهوم عبارت معماری فون نویمان به‌تدریج گسترش پیدا کرد و به‌معنای رایانه‌های تک‌حافظه‌ای درآمد که در آن‌ها امکان واکشی یک دستورالعمل و یک داده به‌صورت هم‌زمان وجود ندارد زیرا هر دو از یک گذرگاه مشترک استفاده می‌کنند. این مسئله که به گلوگاه معماری فون نویمان نیز معروف است، باعث کاهش کارایی اینگونه سامانه‌ها می‌شود.

 

 

*****************************

O P E R AT I N G S Y S T E M S : F R O M 0 T O 1

From hardware to software: Layers of abstraction, 11-18

This chapter gives an intuition on how hardware and software connected together, and how software is represented physically. 2.1 The physical implementation of a bit All electronic devices, from simple to complex, manipulate this flow to achieve desired effects in the real world. Computers are no exception. When we write software, we indirectly manipulate electrical current at the physical level, in such a way that the underlying machine produces desired effects. To understand the process, we consider a simple light bulb. A light bulb can change two states between on and off with a switch, periodically: an off means number 0, and an on means 

However, one problem is that such a switch requires manual intervention from a human. What is required is an automatic switch based on the voltage level, as described above. To enable automatic switching of electrical signals, a device called transistor, invented by William Shockley, John Bardeen and Walter Brattain. This invention started the whole computer industry.

At the core, a transistor is just a resistor whose values can vary based transistor on an input voltage value. Figure 2.1.2: Modern transistor 1 32 With this property, a transistor can be used as a current amplifier (more voltage, less resistance) or switch electrical signals off and on (block and unblock an electron flow) based on a voltage level. At 0 v, no current can pass through a transistor, thus it acts like a circuit with an open switch (light bulb off) because the resistor value is enough to block the electrical flow. Similarly, at +3.5 v, current can flow through a transistor because the resistor value is lessened, effectively enables electron flow, thus acts like a circuit with a closed switch.

If you want a deeper explanation elec- trons move, you should look at the video “How semiconductors work” on Youtube, by Ben Eater. A bit has two states: 0 and 1, which is the building block of all digital systems and software. Similar to a light bulb that can be turned on and off, bits are made out of this electrical stream from the power source: Bit 0 are represented with 0 v (no electron flow), and bit 1 is +3.5 v to +5 v (electron flow). Transistor implements a bit correctly, as it can regulate the electron flow based on voltage level.

2.1.1 MOSFET transistors

The classic transistors invented open a whole new world of micro digital devices. Prior to the invention, vacuum tubes - which are just fancier light bulbs - were used to present 0 and 1, and required human to turn it on and off. MOSFET, or Metal–Oxide–Semiconductor Field-Effect MOSFET Transistor, invented in 1959 by Dawon Kahng and Martin M. (John) Atalla at Bell Labs, is an improved version of classic transistors that is more suitable for digital devices, as it requires shorter switching time between two states 0 and 1, more stable, consumes less power and easier to produce. There are also two types of MOSFETs analogous to two types of transistors: n-MOSFET and p-MOSFET. n-MOSFET and p-MOSFET are also called NMOS and PMOS transistors for short.

2.2 Beyond transistors: digital logic gates

All digital devices are designed with logic gates. A logic gate is a device logic gate that implements a boolean function. Each logic gate includes a number of inputs and an output. All computer operations are built from the combinations of logic gates, which are just combinations of boolean functions.

Logic gates accept only binary inputs1 and produce binary outputs. In 1 Input that is either a 0 or 1. other words, logic gates are functions that transform binary values. Fortunately, a branch of math that deals exclusively with binary values already existed, called Boolean Algebra, developed in the 19thcentury by George Boole. With a sound mathematical theory as a foundation logic gates were created. As logic gates implement Boolean functions, a set of Boolean functions is functionally complete, if this set can construct all other Boolean functionally complete functions can be constructed from. Later, Charles Sanders Peirce (during 1880 – 1881) proved that either Boolean function of NOR or NAND alone is enough to create all other Boolean logic functions. Thus NOR and NAND gates are functionally complete Peirce (1933). Gates are simply the implementations of Boolean logic functions, therefore NAND or NOR gate is enough to implement all other logic gates. The simplest gates CMOS circuit can implement are inverters (NOT gates) and from the inverters, comes NAND gates. With NAND gates, we are confident to implement everything else. This is why the inventions of transistors, then CMOS circuit revolutionized computer industry.

If youwant to understand why and how fromNAND gate we cancreate all Boolean functions and a computer, I suggest the course Build a ModernComputer fromFirst Principles: Fromto Tetris available on Coursera: https://www.coursera.org/ learn/build-a-computer. Go even further, after the course, youshould take the series Computational Structures on Edx. We should realize and appreciate how powerful boolean functions are available in all programming languages.

2.2.2 Logic Gate implementation: CMOS circuit

Underlying every logic gate is a circuit called CMOS - Complementary CMOS MOSFET. CMOS consists of two complementary transistors, NMOS and PMOS. The simplest CMOS circuit is an inverter or a NOT gate:

From NAND gate, we have all other gates. As demonstrated, such a simple circuitry performs the logical operators in day-to-day program languages e.g. NOT operator ~ is executed directly by an inverter circuit, and operator & is executed by an AND circuit and so on. Code does not run on a magic black box. In contrast, code execution is precise and transparent, often as simple as running some hardwired circuit. When we write software, we simply manipulate electrical current at the physical level to run appropriate circuits to produce desired outcomes. However, this whole process somehow does not relate to any thought involving electrical current. That is the real magic and will be explained soon.

and k NMOS transistors (Wakerly, 1999). All logic gates are built by pairs of NMOS and PMOS transistors, and gates are the building blocks of all digital devices from simple to complex, including any computer. Thanks to this pattern, it is possible to separate between the actual physical circuit implementation and logical implementation. Digital designs are done by designing with logic gates then later be “compiled” into physical circuits. In fact, later we will see that logic gates become a language that describes how circuits operate. Understanding how CMOS works is important to understand how a computer is designed, and as a consequence, how a computer works

Finally, an implemented circuit with its wires and transistors is stored physically in a package called a chip. A chip is a substrate that an integrated circuit is etched onto. However, a chip also refers to a completely packaged integrated circuit in consumer market. Depends on the context, it is understood differently.

Example 2.2.1. 74HC00 is a chip with four 2-input NAND gates. The chip comes with 8 input pins and 4 output pins, 1 pin for connecting to a voltage source and 1 pin for connecting to the ground. This device is the physical implementation of NAND gates that we can physically touch and use. But instead of just a single gate, the chip comes with 4 gates that can be combined. Each combination enables a different logic function, effective creating other logic gates. This feature is what make the chip popular. Each of the gates above is just a simple NAND circuit with the electron flows, as demonstrated earlier. Yet, many these NAND-gates chips combined can build a simple computer. Software, at the physical level, is just electron flows.

Beyond Logic Gates: Machine Language 2.3.1

Machine language Being built upon gates, as gates only accept a series of 0 and 1, a hardware device only understands 0 and 1. However, a device only takes 0 and 1 in a systematic way. Machine language is a collection of unique Machine language bit patterns that a device can identify and perform a corresponding action. A machine instruction is a unique bit pattern that a device can identify. In a computer system, a device with its language is called CPU - Central Processing Unit, which controls all activities going inside a computer. For example, in the x86 architecture, the pattern 10100000 means telling a CPU to add two numbers, or 000000101 to halt a computer. In the early days of computers, people had to write completely in binary. Why does such a bit pattern cause a device to do something? The reason is that underlying each instruction is a small circuit that implements the instruction. Similar to how a function/subroutine in a computer program is called by its name, a bit pattern is a name of a little function inside a CPU that got executed when the CPU finds one. Note that CPU is not the only device with its language. CPU is just a name to indicate a hardware device that controls a computer system. A hardware device may not be a CPU but still has its language. A device with its own machine language is a programmable device, since a user can use the language to command the device to perform different actions. For example, a printer has its set of commands for instructing it how to print a page

Example 2.3.1. A user can use 74HC00 chip without knowing its internal, but only the interface for using the device. First, we need to know its layout:

The functional description provides a truth table with all possible pin inputs and outputs, which also describes the usage of all pins in the device. A user needs not to know the implementation, but on such a table to use the device. We can say that the truth table above is the machine language of the device. Since the device is digital, its language is a collection of binary strings: ✄ The device has 8 input pins, and this means it accepts binary strings of 8 bits.

...

 







فایل قبلی که این فایل در ارتباط با آن توسط حسن خ ایجاد شده است