Essential C programming for embedded developers.
Set or Clear a Specific Bit in a Register
Task
Extract the Nibble from an 8-bit Register
Bit Toggle
Check if K-th Bit is Set
Count Set Bits in an Integer
Set the Bit in an 8-bit Register
Clear the Bit in an 8-bit Register
Toggle the Bit in an 8-bit Register
Is the Bit Set
Set Multiple Bits in 8-bit Register
Extract a Bit Field from a 32-bit Register
Set Specific Bits in a 32-bit Register
Clear Specific Bits in a 32-bit Register
Replace Bit Field in a 32-bit Register
Extract Even Bits Only from 32-bit Register
Set Baud Rate Field in Control Register
Rotate Left in an 8-bit Register
Rotate Right in a 32-bit Register
Detect Circular Pattern Match
Count Set Bits in an 8-bit Register
Data Transmission
Carry Flag in 8-bit Addition
Check If a Number Is a Power of Two
Keep Only the Highest Set Bit
Reverse an Array In-Place
Left Rotate Array by K Positions
Find Duplicate in Range 0 and n-1
Sliding Window Sum
Pointer- Swap Value
Print Sum of Even Numbers
Reverse an Array Using Only Pointers
Find Maximum Element Using Pointer Walk
Calculate Array Sum Using Only Pointers
Double Pointer
Swap Two Pointers Using Double Pointers
Pointer to Struct with Bitfields
Construct UART Data Frame with Parity Bit
Add Two Integers Using Void Pointers
Function Pointer Dispatch Table
State Machine Using Function Pointers
Simulate memcpy function Using Pointer Walk
Circular Buffer Insert
Circular Buffer Read
Peek N Bytes from Circular Buffer
Scan Memory for Three Consecutive Increasing Values
Detect Alternating Pattern
Checksum Validation
Validate Configuration Register Layout
Control Register Using Nested Bitfields
Event-Based Triggers Using Function Pointer Array
void pointer and Casting
Union Extract Bytes from a 32-bit Value
Modify Bytes in a 32-bit Value Using Union
Packet Layout Using Union with Struct
Struct Padding
Little Endian to Big Endian
Extract Packet Fields from Byte Stream
Serialized Data Buffer
Pack Multiple Fields into a 16-bit Control Register
Extract and Modify Field in a 32-bit Register
Bit Operations using Macros
Decode Status Register into Human-Readable Flags
Register Bitfields Using Struct Overlay
Decode ADC Result Using Union Bitfields
Transmit Float as Byte Stream Using Union
Detect Underflow in Unsigned Subtraction
Identify Trap in Signed vs Unsigned Comparison
Add Signed and Unsigned Integers Safely
Extract Bit Field from 16-bit Register
Implement Custom strlen Function
Implement Custom strcpy function
Implement Custom strcmp function
Reverse a String In-Place
Remove Duplicate Characters from a String
Count Alphabets Digits and Symbols in a String
Convert Uppercase Letters to Lowercase
Parse Comma-Separated Integers into an Array
Convert String to Integer
Check if the String Numeric or Alphabetic
Convert a String to Float
Split a String Using Delimiter
Linear Search in Array
Binary Search in Sorted Array
Find Minimum and Maximum in an Array
Sort an Array in Ascending Order
Sort an Array in Descending Order
Find Kth Smallest and Kth Largest Element
Find Top 3 Largest Values in an Array
Parse GPS String for Time and Coordinates
Bit Reversal in an 8-bit Value
Bit Spreading Interleave Bits with Zeros
Compress Interleaved Bits Reverse Bit Spreading
Print Binary Representation of an 8-bit or 16-bit Value
Filter Structs by Field Value for example Sensor Threshold
Macro-Based Register Config Helper
Implement Stack Using Array with Push and Pop Operations
Convert Decimal Number to Binary or Hex Without itoa function
Convert Integer to String
Convert Binary String to Integer Without strtol function or Librar...
Convert Hexadecimal String to Integer Without strtol or sscanf fun...
Convert Integer to Hex String Without sprintf or itoa functions
Implement a Simple Shell Command Parser