
{"id":10846,"date":"2016-08-18T16:29:07","date_gmt":"2016-08-18T14:29:07","guid":{"rendered":"https:\/\/www.brickrknowledge.de\/en\/?p=10846"},"modified":"2016-08-19T08:00:34","modified_gmt":"2016-08-19T06:00:34","slug":"logic-for-beginners","status":"publish","type":"post","link":"https:\/\/forum.brickrknowledge.de\/en\/logic-for-beginners\/","title":{"rendered":"Logic for beginners"},"content":{"rendered":"<p>This post is for everyone who enjoyed the blog \u201e<a href=\"https:\/\/forum.brickrknowledge.de\/arduino-for-dummies\/\">Arduino for dummies<\/a>\u201c. Today\u00b4s topic is logic and I\u00b4m writing again as a beginner We\u00b4ll have a closer look at the following gates: AND, OR, NAND, NOR. The sequel wil go online next month.<\/p>\n<p>Let\u00b4s start with the <a href=\"https:\/\/www.brickrknowledge.de\/shop\/BrickRknowledge\/Bricks\/Integrierte-Schaltung\/ALLNET-BrickRknowledge-Logik-AND-CD4011::128276.html?MODsid=dsmp1imeh2klh335dt9sehl8u0\">AND<\/a>. If only one button is pressed, the LED won\u00b4t turn bright. Only if the first AND the second button is pressed, the LED will light up. Now we already understand the concept of the first gate! To make everything more clearly and \u00a0mathematical we can\u00a0display AND in a\u00a0truth table. 1 means button is pressed and 0 means button is not pressed.\u00a0A and B symbolise the two buttons. In the last column you can see a Y, this symbolises the output. In this column 1 means LED lights up, 0 means that the LED stayes dark.<\/p>\n<p><a href=\"https:\/\/www.brickrknowledge.de\/shop\/BrickRknowledge\/Bricks\/Integrierte-Schaltung\/ALLNET-BrickRknowledge-Logik-AND-CD4011::128276.html?MODsid=dsmp1imeh2klh335dt9sehl8u0\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10763\" src=\"https:\/\/www.brickrknowledge.de\/content\/uploads\/2016\/08\/and.jpg\" alt=\"and\" width=\"144\" height=\"146\" \/><\/a><a href=\"https:\/\/www.brickrknowledge.de\/content\/uploads\/2016\/08\/AND1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-10793 size-full\" src=\"https:\/\/www.brickrknowledge.de\/content\/uploads\/2016\/08\/AND1-e1471448978651.jpg\" alt=\"AND1\" width=\"700\" height=\"431\" \/><\/a><\/p>\n<p>The second circuit is already waiting: <a href=\"https:\/\/www.brickrknowledge.de\/shop\/BrickRknowledge\/Bricks\/Integrierte-Schaltung\/ALLNET-BrickRknowledge-Logik-OR-CD4001::128277.html?MODsid=dsmp1imeh2klh335dt9sehl8u0\"><strong>OR<\/strong><\/a>. In short: the LED lights up if one or both buttons are pressed. Therefore the truth table looks like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-10778\" src=\"https:\/\/www.brickrknowledge.de\/content\/uploads\/2016\/08\/or.jpg\" alt=\"or\" width=\"143\" height=\"145\" \/><\/p>\n<p><a href=\"https:\/\/www.brickrknowledge.de\/content\/uploads\/2016\/08\/or2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-10783 size-full\" src=\"https:\/\/www.brickrknowledge.de\/content\/uploads\/2016\/08\/or2-e1471449012632.jpg\" alt=\"or2\" width=\"700\" height=\"431\" \/><\/a><\/p>\n<p>Now we\u00b4re going to face an interesting gate: The <a href=\"https:\/\/www.brickrknowledge.de\/shop\/BrickRknowledge\/Bricks\/Integrierte-Schaltung\/ALLNET-Brick%92R%92knowledge-Logik-NAND-CD4011::113684.html?MODsid=dsmp1imeh2klh335dt9sehl8u0\">NAND <\/a>gate. Why is this gate interesting? You can realise all logical circuit with NAND and NOR (we\u00b4ll come back to that gate in a second). NAND is somehow the opposite of AND. The LED lights up if one or no button is pressed and only shuts off if both buttons are pressed. Here is the truth table for NAND:<\/p>\n<p><a href=\"https:\/\/www.brickrknowledge.de\/shop\/BrickRknowledge\/Bricks\/Integrierte-Schaltung\/ALLNET-Brick%92R%92knowledge-Logik-NAND-CD4011::113684.html?MODsid=dsmp1imeh2klh335dt9sehl8u0\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-10773\" src=\"https:\/\/www.brickrknowledge.de\/content\/uploads\/2016\/08\/NAND.jpg\" alt=\"NAND\" width=\"141\" height=\"146\" \/><\/a><a href=\"https:\/\/www.brickrknowledge.de\/content\/uploads\/2016\/08\/nand2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-10788 size-full\" src=\"https:\/\/www.brickrknowledge.de\/content\/uploads\/2016\/08\/nand2-e1471449034712.jpg\" alt=\"nand2\" width=\"700\" height=\"431\" \/><\/a><\/p>\n<p>Just as NAND is somehow the negative pendent of AND, <a href=\"https:\/\/www.brickrknowledge.de\/shop\/BrickRknowledge\/Bricks\/Integrierte-Schaltung\/ALLNET-Brick%92R%92knowledge-Logik-NOR-CD4001::113685.html?MODsid=dsmp1imeh2klh335dt9sehl8u0\">NOR <\/a>fits with OR. In short: If one or both buttons are pressed, the LED is dark. Just as said before: NOR is also a special gate. It can be displayed with a AND and NOT gate. The NAND can be realised with a OR and NOT gate.<\/p>\n<p><a href=\"https:\/\/www.brickrknowledge.de\/shop\/BrickRknowledge\/Bricks\/Integrierte-Schaltung\/ALLNET-Brick%92R%92knowledge-Logik-NOR-CD4001::113685.html?MODsid=dsmp1imeh2klh335dt9sehl8u0\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-10768\" src=\"https:\/\/www.brickrknowledge.de\/content\/uploads\/2016\/08\/NOR.jpg\" alt=\"NOR\" width=\"138\" height=\"141\" \/><\/a><a href=\"https:\/\/www.brickrknowledge.de\/content\/uploads\/2016\/08\/nor1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-10803 size-full\" src=\"https:\/\/www.brickrknowledge.de\/content\/uploads\/2016\/08\/nor1-e1471449563524.jpg\" alt=\"nor1\" width=\"700\" height=\"414\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post is for everyone who enjoyed the blog \u201eArduino for dummies\u201c. Today\u00b4s topic is logic and I\u00b4m writing again as a beginner We\u00b4ll have a closer look at the following gates: AND, OR, NAND, NOR. The sequel wil go online next month. Let\u00b4s start with the AND. If only one button is pressed, the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":10810,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[169],"tags":[],"class_list":["post-10846","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorised-en-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Logic for beginners - Brick&#039;R&#039;knowledge<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Logic for beginners - Brick&#039;R&#039;knowledge\" \/>\n<meta property=\"og:description\" content=\"This post is for everyone who enjoyed the blog \u201eArduino for dummies\u201c. Today\u00b4s topic is logic and I\u00b4m writing again as a beginner We\u00b4ll have a closer look at the following gates: AND, OR, NAND, NOR. The sequel wil go online next month. Let\u00b4s start with the AND. If only one button is pressed, the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/\" \/>\n<meta property=\"og:site_name\" content=\"Brick&#039;R&#039;knowledge\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/BrickRknowledge\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-18T14:29:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-08-19T06:00:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/brickrknowledge.eu\/content\/uploads\/2016\/08\/logik.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1000\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Julia Bauer\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@brickrknowledge\" \/>\n<meta name=\"twitter:site\" content=\"@brickrknowledge\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Julia Bauer\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/\",\"url\":\"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/\",\"name\":\"Logic for beginners - Brick&#039;R&#039;knowledge\",\"isPartOf\":{\"@id\":\"https:\/\/brickrknowledge.de\/zh-hans\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/forum.brickrknowledge.de\/content\/uploads\/2016\/08\/logik.jpg\",\"datePublished\":\"2016-08-18T14:29:07+00:00\",\"dateModified\":\"2016-08-19T06:00:34+00:00\",\"author\":{\"@id\":\"https:\/\/brickrknowledge.de\/zh-hans\/#\/schema\/person\/d161a2ab4da7f253db816462a58ec5d1\"},\"breadcrumb\":{\"@id\":\"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/#primaryimage\",\"url\":\"https:\/\/forum.brickrknowledge.de\/content\/uploads\/2016\/08\/logik.jpg\",\"contentUrl\":\"https:\/\/forum.brickrknowledge.de\/content\/uploads\/2016\/08\/logik.jpg\",\"width\":1920,\"height\":1000},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/brickrknowledge.de\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Logic for beginners\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/brickrknowledge.de\/zh-hans\/#website\",\"url\":\"https:\/\/brickrknowledge.de\/zh-hans\/\",\"name\":\"Brick&#039;R&#039;knowledge\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/brickrknowledge.de\/zh-hans\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/brickrknowledge.de\/zh-hans\/#\/schema\/person\/d161a2ab4da7f253db816462a58ec5d1\",\"name\":\"Julia Bauer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/brickrknowledge.de\/zh-hans\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6b4fb86265c6cdab30fa8965720cd060?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6b4fb86265c6cdab30fa8965720cd060?s=96&d=mm&r=g\",\"caption\":\"Julia Bauer\"},\"url\":\"https:\/\/forum.brickrknowledge.de\/en\/author\/jbauer\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Logic for beginners - Brick&#039;R&#039;knowledge","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/","og_locale":"en_US","og_type":"article","og_title":"Logic for beginners - Brick&#039;R&#039;knowledge","og_description":"This post is for everyone who enjoyed the blog \u201eArduino for dummies\u201c. Today\u00b4s topic is logic and I\u00b4m writing again as a beginner We\u00b4ll have a closer look at the following gates: AND, OR, NAND, NOR. The sequel wil go online next month. Let\u00b4s start with the AND. If only one button is pressed, the [&hellip;]","og_url":"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/","og_site_name":"Brick&#039;R&#039;knowledge","article_publisher":"https:\/\/www.facebook.com\/BrickRknowledge","article_published_time":"2016-08-18T14:29:07+00:00","article_modified_time":"2016-08-19T06:00:34+00:00","og_image":[{"width":1920,"height":1000,"url":"https:\/\/brickrknowledge.eu\/content\/uploads\/2016\/08\/logik.jpg","type":"image\/jpeg"}],"author":"Julia Bauer","twitter_card":"summary_large_image","twitter_creator":"@brickrknowledge","twitter_site":"@brickrknowledge","twitter_misc":{"Written by":"Julia Bauer","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/","url":"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/","name":"Logic for beginners - Brick&#039;R&#039;knowledge","isPartOf":{"@id":"https:\/\/brickrknowledge.de\/zh-hans\/#website"},"primaryImageOfPage":{"@id":"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/#primaryimage"},"image":{"@id":"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/#primaryimage"},"thumbnailUrl":"https:\/\/forum.brickrknowledge.de\/content\/uploads\/2016\/08\/logik.jpg","datePublished":"2016-08-18T14:29:07+00:00","dateModified":"2016-08-19T06:00:34+00:00","author":{"@id":"https:\/\/brickrknowledge.de\/zh-hans\/#\/schema\/person\/d161a2ab4da7f253db816462a58ec5d1"},"breadcrumb":{"@id":"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/#primaryimage","url":"https:\/\/forum.brickrknowledge.de\/content\/uploads\/2016\/08\/logik.jpg","contentUrl":"https:\/\/forum.brickrknowledge.de\/content\/uploads\/2016\/08\/logik.jpg","width":1920,"height":1000},{"@type":"BreadcrumbList","@id":"https:\/\/brickrknowledge.eu\/en\/logic-for-beginners\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/brickrknowledge.de\/en\/"},{"@type":"ListItem","position":2,"name":"Logic for beginners"}]},{"@type":"WebSite","@id":"https:\/\/brickrknowledge.de\/zh-hans\/#website","url":"https:\/\/brickrknowledge.de\/zh-hans\/","name":"Brick&#039;R&#039;knowledge","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/brickrknowledge.de\/zh-hans\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/brickrknowledge.de\/zh-hans\/#\/schema\/person\/d161a2ab4da7f253db816462a58ec5d1","name":"Julia Bauer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/brickrknowledge.de\/zh-hans\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6b4fb86265c6cdab30fa8965720cd060?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6b4fb86265c6cdab30fa8965720cd060?s=96&d=mm&r=g","caption":"Julia Bauer"},"url":"https:\/\/forum.brickrknowledge.de\/en\/author\/jbauer\/"}]}},"_links":{"self":[{"href":"https:\/\/forum.brickrknowledge.de\/en\/wp-json\/wp\/v2\/posts\/10846"}],"collection":[{"href":"https:\/\/forum.brickrknowledge.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/forum.brickrknowledge.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/forum.brickrknowledge.de\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/forum.brickrknowledge.de\/en\/wp-json\/wp\/v2\/comments?post=10846"}],"version-history":[{"count":0,"href":"https:\/\/forum.brickrknowledge.de\/en\/wp-json\/wp\/v2\/posts\/10846\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/forum.brickrknowledge.de\/en\/wp-json\/wp\/v2\/media\/10810"}],"wp:attachment":[{"href":"https:\/\/forum.brickrknowledge.de\/en\/wp-json\/wp\/v2\/media?parent=10846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/forum.brickrknowledge.de\/en\/wp-json\/wp\/v2\/categories?post=10846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/forum.brickrknowledge.de\/en\/wp-json\/wp\/v2\/tags?post=10846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}