{"id":91,"date":"2022-05-17T15:14:03","date_gmt":"2022-05-17T14:14:03","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/?page_id=91"},"modified":"2022-05-17T15:17:28","modified_gmt":"2022-05-17T14:17:28","slug":"computer-architecture","status":"publish","type":"page","link":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/computer-architecture\/","title":{"rendered":"Computer Architecture"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-92 aligncenter\" src=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17150418\/Screenshot-2022-05-17-150405-300x159.png\" alt=\"\" width=\"510\" height=\"270\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17150418\/Screenshot-2022-05-17-150405-300x159.png 300w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17150418\/Screenshot-2022-05-17-150405-768x408.png 768w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17150418\/Screenshot-2022-05-17-150405-624x332.png 624w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17150418\/Screenshot-2022-05-17-150405.png 907w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"color: red\">The Processor<\/h2>\n<p><span data-contrast=\"none\">The processor is responsible for carrying out the\u00a0<\/span><span data-contrast=\"none\"><strong>fetch\/execute cycle<\/strong>.<\/span><span data-contrast=\"none\">\u00a0This involves accessing memory locations to read and write data, either before or after execution by the processor.<\/span><\/p>\n<p><span data-contrast=\"none\">Modern processors are commonly quad core processors. This means that there are actually four processors that make up the central processing unit. At first there was generally only one core on a processor. This evolved to become dual-core (two processors) and now quad-core.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-93 aligncenter\" src=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17150602\/GetImage-7-300x194.png\" alt=\"\" width=\"373\" height=\"241\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17150602\/GetImage-7-300x194.png 300w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17150602\/GetImage-7.png 624w\" sizes=\"auto, (max-width: 373px) 100vw, 373px\" \/><\/p>\n<p><span class=\"TextRun SCXO147526890 BCX8\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXO147526890 BCX8\">The more processors present, the greater the number of tasks that can be processed simultaneously. This is known as parallel processing, as two different processors can process different tasks (threads) at the same time.<\/span><\/span><span class=\"EOP SCXO147526890 BCX8\">\u00a0<\/span><\/p>\n<h2 style=\"color: red\"><span class=\"TextRun SCXO12320793 BCX8\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXO12320793 BCX8\">Arithmetic and Logic Unit (ALU)<\/span><\/span><span class=\"EOP SCXO12320793 BCX8\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"none\">The Arithmetic and Logic Unit is used by the processor to carry out operations that require the use of:<\/span><\/p>\n<ul style=\"font-weight: 400\">\n<li data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"none\">Logical operations such as AND, OR, NOT<\/span><\/li>\n<li data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"none\">Arithmetic operations such as +, -, *, \/<\/span><\/li>\n<\/ul>\n<h2 style=\"color: red\">Registers<\/h2>\n<p><span data-contrast=\"none\">These are very fast temporary storage locations inside the processor which hold:<\/span><\/p>\n<ul>\n<li data-aria-posinset=\"1\" data-aria-level=\"2\"><span data-contrast=\"none\">data being processed<\/span><\/li>\n<li data-aria-posinset=\"2\" data-aria-level=\"2\"><span data-contrast=\"none\">instructions being executed<\/span><\/li>\n<li data-aria-posinset=\"3\" data-aria-level=\"2\"><span data-contrast=\"none\">addresses of memory locations to be accessed<\/span><\/li>\n<\/ul>\n<p><b><span data-contrast=\"none\">Instruction Register (IR)<\/span><\/b><\/p>\n<p><span data-contrast=\"none\">Holds the instruction currently being\u00a0 decoded and executed by\u00a0<\/span>\u00a0<span data-contrast=\"none\">the processor<\/span><\/p>\n<p><b><span data-contrast=\"none\">The Accumulator (A)<\/span><\/b><\/p>\n<p><span data-contrast=\"none\">Is a data register which holds the accumulated results of calculations performed in the ALU<\/span><\/p>\n<p><b><span data-contrast=\"none\">The program Counter (PC)<\/span><\/b><\/p>\n<p><span data-contrast=\"none\">Is a register which holds the address of the main memory location storing the next instruction to be executed<\/span><span data-contrast=\"none\">\u00a0<\/span><\/p>\n<h2 style=\"color: red\">Buses<\/h2>\n<p><span class=\"TextRun SCXO216318470 BCX8\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"none\"><span class=\"NormalTextRun SCXO216318470 BCX8\">A bus is a collection of wires through which data is transmitted from one part of a computer to another.<\/span><\/span><span class=\"EOP SCXO216318470 BCX8\">\u00a0<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-94 aligncenter\" src=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17151053\/Screenshot-2022-05-17-151040-300x219.png\" alt=\"\" width=\"300\" height=\"219\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17151053\/Screenshot-2022-05-17-151040-300x219.png 300w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17151053\/Screenshot-2022-05-17-151040.png 517w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<h3 style=\"color: red\"><b><span data-contrast=\"none\">Address Bus<\/span><\/b><\/h3>\n<p><span data-contrast=\"none\">The address bus is uni-directional, meaning that it is concerned with passing an address one way, from the CPU to RAM. The\u00a0<\/span><strong>sole purpose of an address bus is to identify the address<\/strong><span data-contrast=\"none\">\u00a0of the location in cache or main memory that is to be read from or written to. Each location in memory will have its own\u00a0<\/span><strong>unique address<\/strong><span data-contrast=\"none\">, this is known as addressability.<\/span><\/p>\n<h3 style=\"color: red\"><b><span data-contrast=\"none\">Data Bus<\/span><\/b><\/h3>\n<p><span data-contrast=\"none\">The data bus is bi-directional because it can<\/span><span data-contrast=\"none\">\u00a0<strong>carry data to main memory from the processor<\/strong><\/span><span data-contrast=\"none\"><strong>\u00a0and vice versa<\/strong>. The data bus will transfer data to\/from the address that is held on the address bus.<\/span><\/p>\n<p><span data-contrast=\"none\">The amount of data that can be carried by the data bus depends on the word size. Word size describes the width of the data bus. At the moment new processors will usually have a word size of 64 lines, allowing for 2<\/span><span data-contrast=\"none\">64<\/span><span data-contrast=\"none\">\u202fbits to be transferred during each cycle.<\/span><\/p>\n<h3 style=\"color: red\"><b><span data-contrast=\"auto\">Control bus<\/span><\/b><\/h3>\n<p><span data-contrast=\"auto\">The control bus is used to identify and initiate the instruction to be carried out.\u00a0\u00a0\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">It is not really a bus at all as each line on the bus is used discretely.\u00a0\u00a0 Some of the common lines in the control bus are:<\/span><\/p>\n<ul>\n<li><span data-contrast=\"auto\">Read<\/span><\/li>\n<li><span data-contrast=\"auto\">Write<\/span><\/li>\n<li><span data-contrast=\"auto\">Clock<\/span><\/li>\n<li><span data-contrast=\"auto\">Interrupt<\/span><\/li>\n<li><span data-contrast=\"auto\">Reset<\/span><\/li>\n<\/ul>\n<h3 style=\"color: red\"><b><span data-contrast=\"auto\">Fetch and Execute Cycle<\/span><\/b><\/h3>\n<p><span data-contrast=\"none\">A program may contain thousands of instructions but the processor can only execute one instruction at a time.\u00a0 The first instruction is fetched from memory in to the processor where it is decoded and executed.\u00a0 Then the second instruction is fetched and then executed and so on until the program ends.\u00a0\u00a0<\/span><\/p>\n<p><span data-contrast=\"none\">This is known as the\u00a0<\/span><b><span data-contrast=\"none\">FETCH \u2013 EXECUTE CYCLE<\/span><\/b><span data-contrast=\"none\">.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-99 aligncenter\" src=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17151652\/Screenshot-2022-05-17-151622-300x95.png\" alt=\"\" width=\"566\" height=\"179\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17151652\/Screenshot-2022-05-17-151622-300x95.png 300w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17151652\/Screenshot-2022-05-17-151622-768x242.png 768w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17151652\/Screenshot-2022-05-17-151622-624x197.png 624w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17151652\/Screenshot-2022-05-17-151622.png 942w\" sizes=\"auto, (max-width: 566px) 100vw, 566px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-100\" src=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17151718\/Screenshot-2022-05-17-151636-300x152.png\" alt=\"\" width=\"787\" height=\"399\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17151718\/Screenshot-2022-05-17-151636-300x152.png 300w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17151718\/Screenshot-2022-05-17-151636-1024x520.png 1024w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17151718\/Screenshot-2022-05-17-151636-768x390.png 768w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17151718\/Screenshot-2022-05-17-151636-624x317.png 624w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phshighercomputingscience\/uploads\/sites\/10042\/2022\/05\/17151718\/Screenshot-2022-05-17-151636.png 1260w\" sizes=\"auto, (max-width: 787px) 100vw, 787px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; The Processor The processor is responsible for carrying out the\u00a0fetch\/execute cycle.\u00a0This involves accessing memory locations to read and write data, either before or after execution by the processor. Modern processors are commonly quad core processors. This means that there are actually four processors that make up the central processing unit. At first there was [&hellip;]<\/p>\n","protected":false},"author":79984,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-91","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/wp-json\/wp\/v2\/pages\/91","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/wp-json\/wp\/v2\/users\/79984"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/wp-json\/wp\/v2\/comments?post=91"}],"version-history":[{"count":3,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/wp-json\/wp\/v2\/pages\/91\/revisions"}],"predecessor-version":[{"id":101,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/wp-json\/wp\/v2\/pages\/91\/revisions\/101"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/wp-json\/wp\/v2\/media?parent=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}