

{"id":120241,"date":"2023-09-25T19:00:47","date_gmt":"2023-09-25T13:30:47","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=120241"},"modified":"2023-09-25T19:08:48","modified_gmt":"2023-09-25T13:38:48","slug":"bitwise-operators-in-c","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/bitwise-operators-in-c\/","title":{"rendered":"Bitwise Operators in C"},"content":{"rendered":"<p>In the world of programming, where every bit matters, bitwise operators stand as the architects of binary manipulation. These operators possess the extraordinary ability to manipulate individual bits, enabling optimization, encryption, and beyond. This article is a guided exploration of bitwise operators in C, their applications, and their significance in modern programming.<\/p>\n<h2>Bitwise Operators: Understanding the Basics<\/h2>\n<p>Before diving into specifics, let&#8217;s grasp the fundamental concept of bitwise operations. Think of them as the tools that allow us to tinker with individual bits, shaping data at the lowest level of representation.<\/p>\n<h3>Types of Bitwise Operators<\/h3>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400\">Operator<\/span><\/td>\n<td><span style=\"font-weight: 400\">Interpretation<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&amp;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Performs bitwise AND operation<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">|<\/span><\/td>\n<td><span style=\"font-weight: 400\">Executes bitwise OR operation<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">^<\/span><\/td>\n<td><span style=\"font-weight: 400\">Conducts bitwise exclusive OR operation<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">~<\/span><\/td>\n<td><span style=\"font-weight: 400\">Applies one&#8217;s complement (unary) operator<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&lt;&lt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Initiates left shift operation<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">&gt;&gt;<\/span><\/td>\n<td><span style=\"font-weight: 400\">Initiates right shift operation<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>AND Operator (&amp;): Precision in Bitwise Surgery<\/h4>\n<p>The AND operator (&#8216;&amp;&#8217;) acts like a surgeon&#8217;s scalpel, extracting the shared bits between two operands. Through simple truth tables and practical examples, we unveil how it clears specific bits, creates masks, and maintains data integrity.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\nint main() {\r\n    \/\/ Define two integers\r\n    int numA = 12;  \/\/ Binary: 1100\r\n    int numB = 10;  \/\/ Binary: 1010\r\n    \/\/ Perform a bitwise AND operation\r\n    int result = numA &amp; numB;  \/\/ Binary result: 1000 (8 in decimal)\r\n    \/\/ Display the result\r\n    printf(\"Result: %d\\n\", result); \/\/ Output: 8\r\n    return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/and-operator-output.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120453 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/and-operator-output.webp\" alt=\"and operator output\" width=\"326\" height=\"142\" \/><\/a><\/p>\n<p><strong>Time Complexity:<\/strong> O(1)<\/p>\n<p><strong>Space Complexity:<\/strong> O(1)<\/p>\n<h4>OR Operator (|): Merging Bits, Uniting Realities<\/h4>\n<p>The OR operator (&#8216;|&#8217;) serves as a bridge, merging the realities of two operands. By exploring scenarios and providing clear examples, we showcase its role in setting bits, combining patterns, and constructing versatile representations.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\nint main() {\r\n    \/\/ Initialize two integer variables\r\n    int valueA = 12; \/\/ Binary: 1100\r\n    int valueB = 10; \/\/ Binary: 1010\r\n    \/\/ Perform a bitwise OR operation on the values\r\n    int bitwiseResult = valueA | valueB; \/\/ Binary result: 1110 (14 in decimal)\r\n    printf(\"After performing a bitwise OR operation on the given values, the result is: %d\\n\", bitwiseResult); \/\/ Output: 14\r\n    return 0; \r\n}<\/pre>\n<p><strong>Output<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/or-operator-output.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120454 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/or-operator-output.webp\" alt=\"or operator output\" width=\"1356\" height=\"150\" \/><\/a><\/p>\n<p><strong>Time Complexity:<\/strong> O(1)<\/p>\n<p><strong>Space Complexity:<\/strong> O(1)<\/p>\n<h4>XOR Operator (^): Balancing Act of Bits<\/h4>\n<p>The XOR operator (&#8216;^&#8217;) performs a bit-level balancing act, accentuating the differences between operands. With engaging examples, we showcase its value in tasks like toggling bits, identifying changes, and performing efficient parity checks.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\nint main() {\r\n    \/\/ Initialize two integer variables\r\n    int valueA = 12;  \/\/ Binary: 1100\r\n    int valueB = 10;  \/\/ Binary: 1010\r\n    int bitwiseResult = valueA ^ valueB;  \/\/ Binary result: 0110 (6 in decimal)\r\n  printf(\"Result: %d\\n\", bitwiseResult); \/\/ Output: 6\r\n    return 0;\r\n}<\/pre>\n<p><strong>Output<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/xor-operator-output.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120455 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/xor-operator-output.webp\" alt=\"xor operator output\" width=\"306\" height=\"134\" \/><\/a><\/p>\n<p><strong>Time Complexity:<\/strong> O(1)<\/p>\n<p><strong>Space Complexity:<\/strong> O(1)<\/p>\n<h4>NOT Operator (~): Bits Reimagined<\/h4>\n<p>The NOT operator (&#8216;~&#8217;) transforms bits with elegance. Through clear demonstrations, we reveal its power in flipping bits, creating complements, and serving as a sentinel for bitwise changes.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\nint main() {\r\n    int num = 5;\r\n    int result = ~num; \r\n\/\/ Using the NOT operator (~) to invert the bits of 'num'\r\n    printf(\"Original number: %d\\n\", num);\r\n    printf(\"Bitwise NOT result: %d\\n\", result);\r\n    return 0;\r\n}<\/pre>\n<p><strong>Output<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/not-operator-output.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120456 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/not-operator-output.webp\" alt=\"not operator output\" width=\"390\" height=\"182\" \/><\/a><\/p>\n<p><strong>Time Complexity:<\/strong> O(1)<\/p>\n<p><strong>Space Complexity:<\/strong> O(1)<\/p>\n<h4>Left Shift Operator (&lt;&lt;): Shifting Perspectives<\/h4>\n<p>The left shift operator (&#8216;&lt;&lt;&#8216;) takes centre stage, magnifying values through bit manipulation. With illustrative examples, we elucidate its role in crafting bit masks, enabling efficient multiplication by powers of 2, and altering binary perspectives.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\nint main() {\r\n    int a = 5;  \/\/ Binary: 0101\r\n    int result = a &lt;&lt; 2;  \/\/ Binary result: 010100 (20 in decimal)\r\n    printf(\"Result of a &lt;&lt; 2: %d\\n\", result);  \/\/ Output: 20\r\n    return 0;\r\n}<\/pre>\n<p><strong>Output<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/left-shift-operator-output.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120457 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/left-shift-operator-output.webp\" alt=\"left shift operator output\" width=\"378\" height=\"142\" \/><\/a><\/p>\n<p><strong>Time Complexity:<\/strong> O(1)<\/p>\n<p><strong>Space Complexity:<\/strong> O(1)<\/p>\n<h4>Right Shift Operator (&gt;&gt;): Precision in Division<\/h4>\n<p>The right shift operator (&#8216;&gt;&gt;&#8217;) steps forward, gracefully dividing values through bit shifting. Through intuitive examples, we uncover its significance in extracting specific bits, facilitating division by 2, and preserving data precision.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\nint main() {\r\n    int a = 20;  \/\/ Binary: 10100\r\n    int result = a &gt;&gt; 2;  \/\/ Binary result: 00101 (5 in decimal)\r\n    printf(\"Result of a &gt;&gt; 2: %d\\n\", result);  \/\/ Output: 5\r\n    return 0;\r\n}<\/pre>\n<p><strong>Output<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/right-shift-operator.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120458 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/right-shift-operator.webp\" alt=\"right shift operator\" width=\"348\" height=\"140\" \/><\/a><\/p>\n<p><strong>Time Complexity:<\/strong> O(1)<\/p>\n<p><strong>Space Complexity:<\/strong> O(1)<\/p>\n<p><strong>Truth Table of Bitwise Operators<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400\">Operand A<\/span><\/td>\n<td><span style=\"font-weight: 400\">Operand B<\/span><\/td>\n<td><span style=\"font-weight: 400\">A &amp; B<\/span><\/td>\n<td><span style=\"font-weight: 400\">A | B<\/span><\/td>\n<td><span style=\"font-weight: 400\">A ^ B<\/span><\/td>\n<td><span style=\"font-weight: 400\">~A<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">1<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">1<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">1<\/span><\/td>\n<td><span style=\"font-weight: 400\">1<\/span><\/td>\n<td><span style=\"font-weight: 400\">1<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">1<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">1<\/span><\/td>\n<td><span style=\"font-weight: 400\">1<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">1<\/span><\/td>\n<td><span style=\"font-weight: 400\">1<\/span><\/td>\n<td><span style=\"font-weight: 400\">1<\/span><\/td>\n<td><span style=\"font-weight: 400\">1<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Real-World Examples: Applications Beyond the Code<\/h3>\n<ul>\n<li><strong>Image Processing:<\/strong> Bitwise operators find their place in image manipulation, where each pixel&#8217;s color values are represented as bits. You can use these operators to change specific color components, create filters, and blend images seamlessly.<\/li>\n<li><strong>Networking Protocols:<\/strong> In networking, bitwise operations play a significant role in protocol design and data packet handling. Flags and control fields in network protocols are often encoded as individual bits, allowing for efficient communication and data interpretation.<\/li>\n<li><strong>Hardware Interfacing:<\/strong> Bitwise operations are vital when interfacing with hardware devices, such as microcontrollers. Setting or clearing specific bits in hardware registers allows you to configure device settings, control peripherals, and manage interrupts.<\/li>\n<\/ul>\n<h3>Common Mistakes and Pitfalls: Navigating the Bit Maze<\/h3>\n<ul>\n<li><strong>Missing Parentheses:<\/strong> Ensure you use parentheses to group bitwise operations correctly, especially when mixing them with other operators. Incorrect grouping can lead to unexpected results.<\/li>\n<li><strong>Operator Precedence:<\/strong> Understand operator precedence to avoid mixing up the order of operations. For example, &#8216;&amp;&#8217; has higher precedence than &#8216;==&#8217;, so use parentheses when needed.<\/li>\n<li><strong>Not Understanding Data Types:<\/strong> Be cautious when performing bitwise operations on different data types. Unexpected results may occur if you&#8217;re not aware of type promotion and truncation.<\/li>\n<li><strong>Shifting Beyond Data Size:<\/strong> When left-shifting, be careful not to shift beyond the size of the data type. Shifting more bits than available can lead to undefined behavior.<\/li>\n<li><strong>Endianness Consideration:<\/strong> Keep endianness in mind, especially when working with multi-byte data. Bitwise operations might behave differently on little-endian and big-endian systems.<\/li>\n<li><strong>Clearing vs. Setting Bits:<\/strong> Ensure you understand the difference between using &#8216;&amp;&#8217; and &#8216;|&#8217;. Mistaking one for the other can lead to unintended consequences.<\/li>\n<\/ul>\n<h3>Conclusion<\/h3>\n<p>In the symphony of programming, bitwise operators take the stage as maestros of manipulation. They empower us to sculpt binary landscapes with finesse. Armed with the knowledge of AND, OR, XOR, NOT, left shift, and right shift, you possess the keys to the realm of binary magic. So go forth, shape your code, and let the artistry of bitwise operators guide your programming endeavours.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the world of programming, where every bit matters, bitwise operators stand as the architects of binary manipulation. These operators possess the extraordinary ability to manipulate individual bits, enabling optimization, encryption, and beyond. This&#46;&#46;&#46;<\/p>\n","protected":false},"author":581,"featured_media":120244,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19488],"tags":[697,19825,28265,23914,9132,9307,28266],"class_list":["post-120241","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-programming","tag-and-operator","tag-bitwise-operators-in-c","tag-c-bitwise-operators","tag-c-programming","tag-not-operator","tag-or-operator","tag-xor-operator"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Bitwise Operators in C - DataFlair<\/title>\n<meta name=\"description\" content=\"In the world of programming, where every bit matters, bitwise operators stand as the architects of binary manipulation.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/bitwise-operators-in-c\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Bitwise Operators in C - DataFlair\" \/>\n<meta property=\"og:description\" content=\"In the world of programming, where every bit matters, bitwise operators stand as the architects of binary manipulation.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/bitwise-operators-in-c\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-25T13:30:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-25T13:38:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/bitwise-operators-in-c.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Bitwise Operators in C - DataFlair","description":"In the world of programming, where every bit matters, bitwise operators stand as the architects of binary manipulation.","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:\/\/data-flair.training\/blogs\/bitwise-operators-in-c\/","og_locale":"en_US","og_type":"article","og_title":"Bitwise Operators in C - DataFlair","og_description":"In the world of programming, where every bit matters, bitwise operators stand as the architects of binary manipulation.","og_url":"https:\/\/data-flair.training\/blogs\/bitwise-operators-in-c\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2023-09-25T13:30:47+00:00","article_modified_time":"2023-09-25T13:38:48+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/bitwise-operators-in-c.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/bitwise-operators-in-c\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/bitwise-operators-in-c\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/c187795dc82ab948373cca526df7c445"},"headline":"Bitwise Operators in C","datePublished":"2023-09-25T13:30:47+00:00","dateModified":"2023-09-25T13:38:48+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/bitwise-operators-in-c\/"},"wordCount":763,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/bitwise-operators-in-c\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/bitwise-operators-in-c.webp","keywords":["AND operator","Bitwise\u00a0Operators in C","c bitwise operators","c programming","NOT operator","OR operator","XOR operator"],"articleSection":["C Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/bitwise-operators-in-c\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/bitwise-operators-in-c\/","url":"https:\/\/data-flair.training\/blogs\/bitwise-operators-in-c\/","name":"Bitwise Operators in C - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/bitwise-operators-in-c\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/bitwise-operators-in-c\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/bitwise-operators-in-c.webp","datePublished":"2023-09-25T13:30:47+00:00","dateModified":"2023-09-25T13:38:48+00:00","description":"In the world of programming, where every bit matters, bitwise operators stand as the architects of binary manipulation.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/bitwise-operators-in-c\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/bitwise-operators-in-c\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/bitwise-operators-in-c\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/bitwise-operators-in-c.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/bitwise-operators-in-c.webp","width":1200,"height":628,"caption":"bitwise operators in c"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/bitwise-operators-in-c\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"C Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/c-programming\/"},{"@type":"ListItem","position":3,"name":"Bitwise Operators in C"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/c187795dc82ab948373cca526df7c445","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2302ebc438084d2f1f993edc1996a0aae01332e81f3227cba8df0c48ec010ca4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2302ebc438084d2f1f993edc1996a0aae01332e81f3227cba8df0c48ec010ca4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2302ebc438084d2f1f993edc1996a0aae01332e81f3227cba8df0c48ec010ca4?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam6\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/120241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=120241"}],"version-history":[{"count":5,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/120241\/revisions"}],"predecessor-version":[{"id":121193,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/120241\/revisions\/121193"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/120244"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=120241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=120241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=120241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}