{"id":4051,"date":"2011-12-12T17:51:02","date_gmt":"2011-12-12T22:51:02","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=4051"},"modified":"2014-07-14T10:14:10","modified_gmt":"2014-07-14T14:14:10","slug":"binary-constant-macros-in-c","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2011\/12\/12\/binary-constant-macros-in-c\/","title":{"rendered":"Binary Constant Macros in C"},"content":{"rendered":"<p><a href=\"http:\/\/bytes.com\/topic\/c\/answers\/216333-binary-constant-macros\">Tom Torfs<\/a> (via <a href=\"http:\/\/www.delicious.com\/url\/606d647975a07c85b76b58c3867340fb\">Jonathan Rentzsch<\/a>):<\/p>\r\n<blockquote cite=\"http:\/\/bytes.com\/topic\/c\/answers\/216333-binary-constant-macros\"><p>I&rsquo;ve been missing the lack of support for binary numeric literals in\r\nC. To get around it I wrote the following handy macros, which allows\r\nyou to simply write something like:<\/p>\r\n<pre>whatever = B8(10101010);<\/pre>\r\n<p>and will translate as:<\/p>\r\n<pre>whatever = 85;<\/pre><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Tom Torfs (via Jonathan Rentzsch): I&rsquo;ve been missing the lack of support for binary numeric literals in C. To get around it I wrote the following handy macros, which allows you to simply write something like: whatever = B8(10101010); and will translate as: whatever = 85;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[45,941,74,71],"class_list":["post-4051","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-c","tag-macros","tag-opensource","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/4051","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=4051"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/4051\/revisions"}],"predecessor-version":[{"id":9140,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/4051\/revisions\/9140"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=4051"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=4051"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=4051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}