
{"id":332,"date":"2018-09-30T10:03:22","date_gmt":"2018-09-30T10:03:22","guid":{"rendered":"http:\/\/blogs.plymouth.ac.uk\/embedded-systems\/?page_id=332"},"modified":"2018-09-30T10:03:22","modified_gmt":"2018-09-30T10:03:22","slug":"logical-not-glossary-entry","status":"publish","type":"page","link":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/glossary-2\/logical-not-glossary-entry\/","title":{"rendered":"Logical NOT (Glossary Entry)"},"content":{"rendered":"<p>In digital electronics and software, we often meet the NOT function.<span class=\"Apple-converted-space\">\u00a0<\/span>The logic symbols for an electronic NOT gate are as follows:<\/p>\n<figure id=\"attachment_333\" aria-describedby=\"caption-attachment-333\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-333\" src=\"http:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/NOT_Gate.png\" alt=\"\" width=\"300\" height=\"261\" srcset=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/NOT_Gate.png 672w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/NOT_Gate-300x261.png 300w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><figcaption id=\"caption-attachment-333\" class=\"wp-caption-text\">Schematic Symbols for the NOT Logic Gate<\/figcaption><\/figure>\n<p>The truth table for NOT is as follows:<\/p>\n<figure id=\"attachment_334\" aria-describedby=\"caption-attachment-334\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-334\" src=\"http:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/NOT-Truth-Table.png\" alt=\"\" width=\"300\" height=\"178\" srcset=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/NOT-Truth-Table.png 424w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/NOT-Truth-Table-300x178.png 300w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><figcaption id=\"caption-attachment-334\" class=\"wp-caption-text\">Truth Table for the NOT gate<\/figcaption><\/figure>\n<p>In words, the output is always equal to the opposite state of the input A. Some observations about this:<\/p>\n<p><i>We use this <\/i><b><i>toggle<\/i><\/b><i> all bits<\/i><\/p>\n<p>This is not limited to single bits. In software, we often perform logical operations on integers (binary numbers). Consider the following example:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-335\" src=\"http:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/NOT-Example.png\" alt=\"\" width=\"400\" height=\"113\" srcset=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/NOT-Example.png 1514w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/NOT-Example-300x84.png 300w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/NOT-Example-768x216.png 768w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/NOT-Example-1024x288.png 1024w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<p>The NOT function is applied a decimal number. In the C or C++ programming language, this could be calculated as:<\/p>\n<pre class=\"theme:xcode lang:c++ decode:true \">unsigned A = 170; \/\/AA IN HEX\r\n\r\nA = ~A;<\/pre>\n<p>The result is 85 <span class=\"Apple-converted-space\">\u00a0 <\/span>\/\/55 IN HEX<\/p>\n<p>This is sometimes known as a 1\u2019s compliment. When we use 2\u2019s compliment signed arithmetic, the inversion of bits is part of the process of changing the sign of a signed integer.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In digital electronics and software, we often meet the NOT function.\u00a0The logic symbols for an electronic NOT gate are as follows: The truth table for NOT is as follows: In words, the output is always equal to the opposite state of the input A. Some observations about this: We use this toggle all bits This&hellip; <a class=\"more-link\" href=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/glossary-2\/logical-not-glossary-entry\/\">Continue reading <span class=\"screen-reader-text\">Logical NOT (Glossary Entry)<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":153,"menu_order":42,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-332","page","type-page","status-publish","hentry","entry"],"_links":{"self":[{"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/pages\/332","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/comments?post=332"}],"version-history":[{"count":1,"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/pages\/332\/revisions"}],"predecessor-version":[{"id":336,"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/pages\/332\/revisions\/336"}],"up":[{"embeddable":true,"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/pages\/153"}],"wp:attachment":[{"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/media?parent=332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}