{"id":605,"date":"2017-01-04T15:07:13","date_gmt":"2017-01-04T23:07:13","guid":{"rendered":"http:\/\/www.tech.dimprash.com\/?p=605"},"modified":"2017-01-04T15:07:13","modified_gmt":"2017-01-04T23:07:13","slug":"how-to-compare-two-integers-using-bitwise-operator-without-using-any-comparative-operator","status":"publish","type":"post","link":"http:\/\/www.tech.dimprash.com\/?p=605","title":{"rendered":"How to compare two integers using bitwise operator without using any comparative operator."},"content":{"rendered":"<p>1)<br \/>\nint x = 10;<br \/>\nint y = 12;<\/p>\n<p>int z = 0;<\/p>\n<p>z = x ^ y;<\/p>\n<p>If the value of z is 0 then the two integer is equal. If the value is not zero the two integer is not equal. <\/p>\n<p>2)<br \/>\nfunction isEqual() {<br \/>\nreturn !(x-y)<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1) int x = 10; int y = 12; int z = 0; z = x ^ y; If the value of z is 0 then the two integer is equal. If the value is not zero the two integer is not equal. 2) function isEqual() { return !(x-y) }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-605","post","type-post","status-publish","format-standard","hentry","category-algorithms"],"_links":{"self":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=605"}],"version-history":[{"count":1,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/605\/revisions"}],"predecessor-version":[{"id":606,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/605\/revisions\/606"}],"wp:attachment":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=605"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}