bsc

Comprehensive codebase and cou...
Log | Files | Refs | README | LICENSE

luc103.c (1039B)


      1 /*
      2  * Author  : Amit Dutta <amitdutta4255@gmail.com>
      3  * Date    : 08 Feb 2026
      4  * Repo    : https://github.com/notamitgamer/bsc
      5  * License : MIT License (See the LICENSE file for details)
      6  */
      7 
      8 /* What is the hexadecimal equivalent of the following binary numbers?
      9 */
     10 /* Let Us C, Chap- 21 (Operations on Bits), Qn No.: B(a) */
     11 
     12 /* This file is auto-generated by a bot. */
     13 /* This code is not compiled; it is for reference only. */
     14 
     15 
     16 #include <stdio.h>
     17 #include <stdlib.h>
     18 
     19 int main()
     20 {
     21     // Binary numbers represented as string literals for reference
     22     // 01011010
     23     // 11000011
     24     // 1010101001110101
     25     // 111100001011010
     26 
     27     printf("Binary: 01011010          -> Hex: 0x%X\n", 0b01011010);
     28     printf("Binary: 11000011          -> Hex: 0x%X\n", 0b11000011);
     29     printf("Binary: 1010101001110101  -> Hex: 0x%X\n", 0b1010101001110101);
     30     printf("Binary: 111100001011010   -> Hex: 0x%X\n", 0b111100001011010);
     31 
     32     /* Note: Binary literals (0b...) are a standard C extension (GCC) and part of C23 standard. */
     33     
     34     return 0;
     35 }
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror