{"id":1345,"date":"2022-11-02T17:20:04","date_gmt":"2022-11-02T16:20:04","guid":{"rendered":"https:\/\/localdab.org\/?page_id=1345"},"modified":"2023-08-08T10:31:55","modified_gmt":"2023-08-08T08:31:55","slug":"compiler","status":"publish","type":"page","link":"https:\/\/localdab.org\/index.php\/glossary\/a-d\/compiler\/","title":{"rendered":"Compiler"},"content":{"rendered":"\n<h2 class=\"has-large-font-size wp-block-heading\">What is a COMPILER and what is COMPILING a program?<\/h2>\n\n\n\n<p>A compiler is a computer program. It <strong>translates<\/strong> a high-level programming language (C, C++, etc.) into binary code for a particular CPU (Central Processing Unit).<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/localdab.org\/wp-content\/uploads\/2022\/11\/Compiler-2.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"431\" data-id=\"1402\" src=\"https:\/\/localdab.org\/wp-content\/uploads\/2022\/11\/Compiler-2-1024x431.jpg\" alt=\"\" class=\"wp-image-1402\" srcset=\"https:\/\/localdab.org\/wp-content\/uploads\/2022\/11\/Compiler-2-1024x431.jpg 1024w, https:\/\/localdab.org\/wp-content\/uploads\/2022\/11\/Compiler-2-300x126.jpg 300w, https:\/\/localdab.org\/wp-content\/uploads\/2022\/11\/Compiler-2-768x323.jpg 768w, https:\/\/localdab.org\/wp-content\/uploads\/2022\/11\/Compiler-2-1536x647.jpg 1536w, https:\/\/localdab.org\/wp-content\/uploads\/2022\/11\/Compiler-2.jpg 1589w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/figure>\n\n\n\n<p class=\"has-text-align-center\"><em>FIG. \u2013 Translation of high-level language into executable CPU code<\/em><\/p>\n\n\n\n<p>CPUs execute their program by reading instructions from memory in binary code (often hexadecimal words). These codes differ from CPU to CPU type.<\/p>\n\n\n\n<p>An important advantage of high-level languages and compiling them is the <strong>portability<\/strong> of programs on different CPU platforms. Portability means compiling <strong>source code<\/strong> with different compilers for different CPU platforms.<\/p>\n\n\n\n<p>The compiler will turn the high-level programming language into codes corresponding to different CPU instruction sets. A source program compiled by an Apple C++ compiler will also run on Windows when compiled with a Windows C++ compiler.<\/p>\n\n\n\n<p>In the early days of computers, one wrote programs (&#8216;object code&#8217;) directly in binary code understandable by the CPU. The number of instructions needed to write a program was huge, difficult, and cumbersome. Nowadays, we program computers in high-level languages with instructions written as readable text (often similar to English). After writing the program in source code, we must compile the source code into code executable by the CPU.<\/p>\n\n\n\n<p>The source code, written in C++ of the ODR-mmbTools, can be found on GitHub. Once downloaded, you will have to compile it into executable object code for the CPU on your PC. The Linux operating system uses the ISO C++ GCC (GNU Compiler Collection).<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><a href=\"https:\/\/localdab.org\/index.php\/glossary\/\">Back<\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is a COMPILER and what is COMPILING a program? A compiler is a computer program. It translates a high-level programming language (C, C++, etc.) into binary code for a particular CPU (Central Processing Unit). FIG. \u2013 Translation of high-level language into executable CPU code CPUs execute their program by reading instructions from memory in [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":1257,"menu_order":31,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1345","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/localdab.org\/index.php\/wp-json\/wp\/v2\/pages\/1345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/localdab.org\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/localdab.org\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/localdab.org\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/localdab.org\/index.php\/wp-json\/wp\/v2\/comments?post=1345"}],"version-history":[{"count":20,"href":"https:\/\/localdab.org\/index.php\/wp-json\/wp\/v2\/pages\/1345\/revisions"}],"predecessor-version":[{"id":1533,"href":"https:\/\/localdab.org\/index.php\/wp-json\/wp\/v2\/pages\/1345\/revisions\/1533"}],"up":[{"embeddable":true,"href":"https:\/\/localdab.org\/index.php\/wp-json\/wp\/v2\/pages\/1257"}],"wp:attachment":[{"href":"https:\/\/localdab.org\/index.php\/wp-json\/wp\/v2\/media?parent=1345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}