{"id":13507,"date":"2023-01-06T10:40:29","date_gmt":"2023-01-06T05:10:29","guid":{"rendered":"https:\/\/fastbitlab.com\/?p=13507"},"modified":"2023-09-18T16:13:32","modified_gmt":"2023-09-18T10:43:32","slug":"microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields","status":"publish","type":"post","link":"https:\/\/fastbitlab.com\/blog\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\/","title":{"rendered":"Microcontroller Embedded C Programming Lecture 155| Structure and bit fields"},"content":{"rendered":"<div class=\"boldgrid-section\" style=\"background-image: linear-gradient(to left, #eeeeee, #eeeeee);\" data-bg-color-1=\"#EEEEEE\" data-bg-color-2=\"#EEEEEE\" data-bg-direction=\"to left\">\n<div class=\"container\">\n<div class=\"row\" style=\"padding-top: 40px; padding-bottom: 0px; background-image: linear-gradient(to left, #eeeeee, #eeeeee);\" data-bg-color-1=\"#EEEEEE\" data-bg-color-2=\"#EEEEEE\" data-bg-direction=\"to left\">\n<div class=\"col-md-1 col-sm-12 col-xs-12 col-lg-1\">\n<div class=\"boldgrid-shortcode\" data-imhwpb-draggable=\"true\">\n\n<\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<div class=\"col-md-10 col-sm-12 col-xs-12 col-lg-10\">\n<h1 class=\"\" style=\"font-size: 30px; border-width: 0px; line-height: 50px; font-family: 'Roboto Slab'; font-weight: 400; margin-top: 10px; text-align: center;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000080;\"><strong>Structure and bit fields<\/strong><\/span><\/h1>\n<div class=\"row bg-editor-hr-wrap\">\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\n<div>\n<div class=\"bg-hr bg-hr-10 color2-color\" style=\"border-style: solid; border-width: 0px 0px 3px;\"><\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">In this article, we delve into the concept of structure bit fields, exploring how to use them effectively to optimize memory consumption.<\/span><\/p>\n<p class=\"\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 20px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #ff0000;\"><strong>What Are Bit Fields?<\/strong><\/span><\/p>\n<ul class=\"\" style=\"font-size: 17px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li><span style=\"color: #000000;\">Bit fields are a feature in C and C++ that allow us to allocate specific numbers of bits for individual variables within a structure.<\/span><\/li>\n<li><span style=\"color: #000000;\">They are useful for optimizing memory usage when dealing with bit-level data within larger data structures.<\/span><\/li>\n<\/ul>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 20px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline; color: #993366;\"><strong>Understanding Bit Fields with an Example<\/strong><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Let&#8217;s consider our previous example.<\/span><\/p>\n<figure id=\"attachment_13510\" aria-describedby=\"caption-attachment-13510\" style=\"width: 587px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-13510 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/01\/Figure-1-2.png\" alt=\"Figure 1. Bit-fields\" width=\"587\" height=\"230\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-1-2.png 1857w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-1-2-300x117.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-1-2-1024x401.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-1-2-768x301.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-1-2-600x235.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-1-2-1536x601.png 1536w\" sizes=\"(max-width: 587px) 100vw, 587px\" \/><figcaption id=\"caption-attachment-13510\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 1. Bit-fields<\/span><\/figcaption><\/figure>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Here, we have a packet of 32 bits and the CRC(Cyclic Redundancy Check) is of just 2 bits. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">In the previous exercise, we extracted the CRC and stored it in a variable of type U8 and CRC is equal to the extracted value. So, here we are losing 6 bits. Because only two bits are being utilized.&nbsp;<\/span><\/p>\n<p class=\"\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 20px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #ff0000;\"><strong>How to prevent this?&nbsp;<\/strong><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">To prevent this we have to rewrite our structure using bit fields. Here are the key steps:<\/span><\/p>\n<p class=\"\" style=\"font-size: 18px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline; color: #000080;\"><strong>Selecting Appropriate Data Types<\/strong>:<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Before using bit fields in a structure first you must select the appropriate data type for the member elements. So, that is a very important step.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Select a proper data type, whether you are going to use U8, U16, U32 whatever. So, you have to select that first. That selection depends upon what you are trying to do.<\/span><\/p>\n<p class=\"\" style=\"font-size: 18px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline; color: #000080;\"><strong>Implementing Bit Fields:<\/strong><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Look at Figure 1, I have a packet of 32 bits and I just want to extract various fields into variables. That&#8217;s why, I start with a data type U32 and then I create a variable, let&#8217;s say CRC. But I will instruct the compiler to use just 2 bits of this U32, which is a 32-bit memory.&nbsp; That&#8217;s why I write like this. I give a colon here and then I write 2.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">There will be 32 bits of memory. So, this is the memory of 32 bits and inside this only two bits will be given to the variable CRC, as shown in Figure 2.<\/span><\/p>\n<p class=\"\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400;\"><span style=\"color: #000000;\">After that, Status. Again I continue with the same data type U32 and I write another variable status and :1.&nbsp; The next 1 bit will be given to the variable status.<\/span>&nbsp;<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">So, I again take the U32 data type, don&#8217;t change the data type, until you consume all the remaining bits. The code is shown in Figure 2.&nbsp;<\/span><\/p>\n<figure id=\"attachment_13511\" aria-describedby=\"caption-attachment-13511\" style=\"width: 593px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-13511 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/01\/Figure-2-2.png\" alt=\"Figure 2. Code \" width=\"593\" height=\"346\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-2-2.png 1331w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-2-2-300x175.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-2-2-1024x598.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-2-2-768x448.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-2-2-600x350.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-2-2-1200x700.png 1200w\" sizes=\"(max-width: 593px) 100vw, 593px\" \/><figcaption id=\"caption-attachment-13511\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 2. Code<\/span><\/figcaption><\/figure>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">So, like that, you are going to consume all the 32 bits and you have already asked the compiler to access those bit fields using a dedicated variable name.&nbsp;&nbsp;<\/span><\/p>\n<p class=\"\" style=\"font-size: 18px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline; color: #000080;\"><strong>Efficient Memory Usage:<\/strong><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">If you do this, you can see that both your requirements are fulfilled. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">The first requirement was to store different bit fields in a separate variable and our second requirement is to minimize memory consumption.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">The output is shown in Figure 3. Here is an output of our old program and the new program. You can see that the output looks the same(New and Old),&nbsp; but our old program consumes 10 bytes.<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400;\"><span style=\"color: #000000;\">This(NEW output) is output with a bit field modification and here you can see that the structure size is just 4 bytes.<\/span>&nbsp;<\/span><\/p>\n<figure id=\"attachment_13512\" aria-describedby=\"caption-attachment-13512\" style=\"width: 695px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-13512 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/01\/Figure-3-1.png\" alt=\"Figure 3. Output \" width=\"695\" height=\"260\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-3-1.png 1742w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-3-1-300x112.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-3-1-1024x383.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-3-1-768x287.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-3-1-600x225.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-3-1-1536x575.png 1536w\" sizes=\"(max-width: 695px) 100vw, 695px\" \/><figcaption id=\"caption-attachment-13512\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 3. Output<\/span><\/figcaption><\/figure>\n<p class=\"\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">We come to know that by using bit fields, <\/span><\/p>\n<ul class=\"\">\n<li style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\"><span style=\"font-weight: 400; color: #000000;\">We reduced the memory consumption of a structure. <\/span><\/li>\n<li style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\"><span style=\"font-weight: 400; color: #000000;\">Whenever you find codes that are related to networking activities, then you often find these bit field structures. So, these are heavily used when you deal with networking activities in code.&nbsp;<\/span><\/li>\n<\/ul>\n<p data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 18px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline; color: #000080;\"><strong>Order of Member Elements:<\/strong><\/span><\/p>\n<p class=\"\" style=\"font-size: 17px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Also you should note one point, the order of the member elements doesn&#8217;t matter actually. Because each member element will anyway go to consume only that many amounts of bits. So, but the order in which they appear in the memory may change. That&#8217;s why it is not recommended actually to change the order.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">I wrote this order to refer to my packet information. Most of the time you will be implementing bit fields like that by referring to something. So, don&#8217;t change the order of the member elements.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">So, even if you change the order of the member elements the output will come the same for this application(Figure 4).<\/span><\/p>\n<figure id=\"attachment_13513\" aria-describedby=\"caption-attachment-13513\" style=\"width: 655px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-13513 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/01\/Figure-4-1.png\" alt=\"Figure 4. Output\" width=\"655\" height=\"325\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-4-1.png 1413w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-4-1-300x149.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-4-1-1024x508.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-4-1-768x381.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-4-1-600x298.png 600w\" sizes=\"(max-width: 655px) 100vw, 655px\" \/><figcaption id=\"caption-attachment-13513\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 4. Output<\/span><\/figcaption><\/figure>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">But that will cause a problem when you send that structure value as a 32-bit value to some other function or some other module. In that case, you may face issues.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">That&#8217;s about bit fields.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 18px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #993366;\"><strong>Get Full Course on Microcontroller Embedded C Programming<\/strong> <span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/www.udemy.com\/course\/microcontroller-embedded-c-programming\/\">Here<\/a><\/span><\/span>.<\/p>\n<p class=\"\" style=\"font-size: 23px; border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000080;\"><b>FastBit Embedded Brain Academy Courses<\/b><\/span><\/p>\n<p class=\"\" style=\"font-size: 17px; border-width: 0px;\"><span style=\"color: #000000;\">C<span style=\"font-weight: 400;\"><span style=\"color: #000000;\">lick here:<\/span><span style=\"color: #0000ff;\">&nbsp;<\/span><\/span><\/span><span style=\"color: #0000ff;\"><a style=\"color: #0000ff; text-decoration: underline;\" href=\"http:\/\/fastbitlab.com\/course1\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/fastbitlab.com\/course1<\/span><\/a><\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Structure and bit fields &nbsp; In this article, we delve into the concept of structure bit fields, exploring how to use them effectively to optimize memory consumption. &nbsp; What Are Bit Fields? Bit fields are a feature in C and C++ that allow us to allocate specific numbers of bits for individual variables within [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":13510,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[8],"tags":[16],"class_list":["post-13507","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-microcontroller-embedded-c-programming","entry","has-media"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Structure and bit fields in C<\/title>\n<meta name=\"description\" content=\"Learn how to effectively use bit fields in C programming to optimize memory consumption and extract specific fields into variables.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fastbitlab.com\/blog\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Structure and bit fields in C\" \/>\n<meta property=\"og:description\" content=\"Learn how to effectively use bit fields in C programming to optimize memory consumption and extract specific fields into variables.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fastbitlab.com\/blog\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\/\" \/>\n<meta property=\"og:site_name\" content=\"FastBit EBA\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/fastbiteba\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-06T05:10:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-18T10:43:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-1-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1857\" \/>\n\t<meta property=\"og:image:height\" content=\"727\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"FastBitLab\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:site\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"FastBitLab\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\\\/\"},\"author\":{\"name\":\"FastBitLab\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\"},\"headline\":\"Microcontroller Embedded C Programming Lecture 155| Structure and bit fields\",\"datePublished\":\"2023-01-06T05:10:29+00:00\",\"dateModified\":\"2023-09-18T10:43:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\\\/\"},\"wordCount\":806,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/Figure-1-2.png\",\"keywords\":[\"Microcontroller Embedded C programming Lectures\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\\\/\",\"name\":\"Structure and bit fields in C\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/Figure-1-2.png\",\"datePublished\":\"2023-01-06T05:10:29+00:00\",\"dateModified\":\"2023-09-18T10:43:32+00:00\",\"description\":\"Learn how to effectively use bit fields in C programming to optimize memory consumption and extract specific fields into variables.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\\\/#primaryimage\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/Figure-1-2.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/Figure-1-2.png\",\"width\":1857,\"height\":727,\"caption\":\"Figure 1. Bit-fields\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Microcontroller Embedded C Programming Lecture 155| Structure and bit fields\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"name\":\"FastBit EBA\",\"description\":\"Your Online Academy of Embedded Systems\",\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\",\"name\":\"FastBit EBA\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"width\":640,\"height\":640,\"caption\":\"FastBit EBA\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/fastbiteba\\\/\",\"https:\\\/\\\/x.com\\\/fastbiteba\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/fastbit-embedded-brain-academy-b3167b124\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCa1REBV9hyrzGp2mjJCagBg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\",\"name\":\"FastBitLab\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"caption\":\"FastBitLab\"},\"description\":\"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Structure and bit fields in C","description":"Learn how to effectively use bit fields in C programming to optimize memory consumption and extract specific fields into variables.","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:\/\/fastbitlab.com\/blog\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\/","og_locale":"en_US","og_type":"article","og_title":"Structure and bit fields in C","og_description":"Learn how to effectively use bit fields in C programming to optimize memory consumption and extract specific fields into variables.","og_url":"https:\/\/fastbitlab.com\/blog\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\/","og_site_name":"FastBit EBA","article_publisher":"https:\/\/www.facebook.com\/fastbiteba\/","article_published_time":"2023-01-06T05:10:29+00:00","article_modified_time":"2023-09-18T10:43:32+00:00","og_image":[{"width":1857,"height":727,"url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-1-2.png","type":"image\/png"}],"author":"FastBitLab","twitter_card":"summary_large_image","twitter_creator":"@fastbiteba","twitter_site":"@fastbiteba","twitter_misc":{"Written by":"FastBitLab","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fastbitlab.com\/blog\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\/#article","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\/"},"author":{"name":"FastBitLab","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d"},"headline":"Microcontroller Embedded C Programming Lecture 155| Structure and bit fields","datePublished":"2023-01-06T05:10:29+00:00","dateModified":"2023-09-18T10:43:32+00:00","mainEntityOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\/"},"wordCount":806,"commentCount":0,"publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-1-2.png","keywords":["Microcontroller Embedded C programming Lectures"],"articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fastbitlab.com\/blog\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fastbitlab.com\/blog\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\/","url":"https:\/\/fastbitlab.com\/blog\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\/","name":"Structure and bit fields in C","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\/#primaryimage"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-1-2.png","datePublished":"2023-01-06T05:10:29+00:00","dateModified":"2023-09-18T10:43:32+00:00","description":"Learn how to effectively use bit fields in C programming to optimize memory consumption and extract specific fields into variables.","breadcrumb":{"@id":"https:\/\/fastbitlab.com\/blog\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fastbitlab.com\/blog\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\/#primaryimage","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-1-2.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/01\/Figure-1-2.png","width":1857,"height":727,"caption":"Figure 1. Bit-fields"},{"@type":"BreadcrumbList","@id":"https:\/\/fastbitlab.com\/blog\/microcontroller-embedded-c-programming-lecture-155-structure-and-bit-fields\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fastbitlab.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Microcontroller Embedded C Programming Lecture 155| Structure and bit fields"}]},{"@type":"WebSite","@id":"https:\/\/fastbitlab.com\/blog\/#website","url":"https:\/\/fastbitlab.com\/blog\/","name":"FastBit EBA","description":"Your Online Academy of Embedded Systems","publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fastbitlab.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fastbitlab.com\/blog\/#organization","name":"FastBit EBA","url":"https:\/\/fastbitlab.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","width":640,"height":640,"caption":"FastBit EBA"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/fastbiteba\/","https:\/\/x.com\/fastbiteba","https:\/\/www.linkedin.com\/in\/fastbit-embedded-brain-academy-b3167b124\/","https:\/\/www.youtube.com\/channel\/UCa1REBV9hyrzGp2mjJCagBg"]},{"@type":"Person","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d","name":"FastBitLab","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","caption":"FastBitLab"},"description":"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries."}]}},"_links":{"self":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/13507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/comments?post=13507"}],"version-history":[{"count":4,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/13507\/revisions"}],"predecessor-version":[{"id":16008,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/13507\/revisions\/16008"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media\/13510"}],"wp:attachment":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media?parent=13507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/categories?post=13507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/tags?post=13507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}