<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Farhan Adil</title>
    <description>The latest articles on DEV Community by Farhan Adil (@farhan_adil1).</description>
    <link>https://dev.to/farhan_adil1</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3721929%2F15bed4f8-cda5-4451-8b6f-729a12be5477.png</url>
      <title>DEV Community: Farhan Adil</title>
      <link>https://dev.to/farhan_adil1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/farhan_adil1"/>
    <language>en</language>
    <item>
      <title>What Is Binary Coded Decimal (BCD) and Why Do Hardware Systems Still Use It?</title>
      <dc:creator>Farhan Adil</dc:creator>
      <pubDate>Tue, 01 Dec 2026 10:48:33 +0000</pubDate>
      <link>https://dev.to/farhan_adil1/what-is-binary-coded-decimal-bcd-and-why-do-hardware-systems-still-use-it-49if</link>
      <guid>https://dev.to/farhan_adil1/what-is-binary-coded-decimal-bcd-and-why-do-hardware-systems-still-use-it-49if</guid>
      <description>&lt;p&gt;If you have ever worked with digital clocks, seven segment displays, financial calculators, or microcontroller sensors, you have almost certainly encountered &lt;strong&gt;Binary Coded Decimal (BCD)&lt;/strong&gt;. At first glance, BCD looks very similar to standard binary, yet mixing the two up is a classic bug when reading hardware registers or serial device outputs.&lt;/p&gt;

&lt;p&gt;Here is a clear look at how BCD works, how it differs from pure binary, and where ASCII fits into the picture.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Pure Binary vs. Binary Coded Decimal (BCD)
&lt;/h3&gt;

&lt;p&gt;In standard binary, an entire decimal number is converted as one single value. In &lt;strong&gt;BCD&lt;/strong&gt;, each individual decimal digit (&lt;code&gt;0&lt;/code&gt; through &lt;code&gt;9&lt;/code&gt;) is encoded separately into its own &lt;strong&gt;4 bit binary nibble&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Take the decimal number &lt;strong&gt;25&lt;/strong&gt; as an example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;In Pure Binary:&lt;/strong&gt; &lt;code&gt;25&lt;/code&gt; equals &lt;code&gt;00011001&lt;/code&gt; (one 8 bit byte representing &lt;code&gt;16 + 8 + 1&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;In BCD:&lt;/strong&gt; We split &lt;code&gt;25&lt;/code&gt; into two separate digits (&lt;code&gt;2&lt;/code&gt; and &lt;code&gt;5&lt;/code&gt;):

&lt;ul&gt;
&lt;li&gt;Digit &lt;code&gt;2&lt;/code&gt; becomes &lt;code&gt;0010&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Digit &lt;code&gt;5&lt;/code&gt; becomes &lt;code&gt;0101&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Combined BCD result: &lt;code&gt;0010 0101&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Notice that &lt;code&gt;0010 0101&lt;/code&gt; in pure binary would equal &lt;code&gt;37&lt;/code&gt;, not &lt;code&gt;25&lt;/code&gt;. Because BCD treats every 4 bit group strictly as a digit from &lt;code&gt;0&lt;/code&gt; to &lt;code&gt;9&lt;/code&gt;, bit patterns from &lt;code&gt;1010&lt;/code&gt; (&lt;code&gt;10&lt;/code&gt;) to &lt;code&gt;1111&lt;/code&gt; (&lt;code&gt;15&lt;/code&gt;) are invalid in standard BCD.&lt;/p&gt;

&lt;p&gt;When testing sensor outputs or verifying microcontroller math during lab work, running numbers through an online &lt;a href="https://binaryconverter.org/bcd-converter" rel="noopener noreferrer"&gt;BCD Converter&lt;/a&gt; makes it easy to compare standard binary and BCD nibbles side by side.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Why Hardware Still Uses BCD Today
&lt;/h3&gt;

&lt;p&gt;Pure binary is more memory efficient, so why do modern Real Time Clock (RTC) chips and industrial displays still rely on BCD?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Zero Floating Point Rounding Errors:&lt;/strong&gt; Financial systems and tax registers use decimal arithmetic to avoid binary floating point precision issues with numbers like &lt;code&gt;0.1&lt;/code&gt; or &lt;code&gt;0.2&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Direct Display Driving:&lt;/strong&gt; Driving a seven segment LED display from pure binary requires dividing by 10 in hardware. With BCD, each 4 bit nibble maps directly to a single display digit with simple logic gates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human Readable Memory Dumps:&lt;/strong&gt; When inspecting raw hex logs from an RTC chip, &lt;code&gt;0x25&lt;/code&gt; in BCD reads directly as &lt;code&gt;25&lt;/code&gt; seconds or minutes without mental base conversion.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  3. How BCD Differs From ASCII Digits
&lt;/h3&gt;

&lt;p&gt;Another common point of confusion happens when devices transmit numeric strings over UART or serial ports using &lt;strong&gt;ASCII&lt;/strong&gt; instead of BCD.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;BCD&lt;/strong&gt; encodes the digit &lt;code&gt;5&lt;/code&gt; in 4 bits: &lt;code&gt;0101&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ASCII&lt;/strong&gt; encodes the character &lt;code&gt;'5'&lt;/code&gt; as decimal &lt;code&gt;53&lt;/code&gt;, which takes a full 8 bit byte: &lt;code&gt;00110101&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you read serial data expecting packed BCD digits and get values starting with &lt;code&gt;0011&lt;/code&gt;, your device is actually sending ASCII characters. You can quickly decode those bytes back into readable characters using a &lt;a href="https://binaryconverter.org/binary-to-ascii" rel="noopener noreferrer"&gt;Binary to ASCII&lt;/a&gt; tool or check how raw text characters map to bytes with an &lt;a href="https://binaryconverter.org/ascii-to-binary" rel="noopener noreferrer"&gt;ASCII to Binary&lt;/a&gt; converter.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick Debugging Tip
&lt;/h3&gt;

&lt;p&gt;Whenever you are inspecting unfamiliar byte streams from hardware logs, APIs, or student digital logic assignments, having a fast browser based &lt;a href="https://binaryconverter.org/binary-translator" rel="noopener noreferrer"&gt;Binary Translator&lt;/a&gt; or the full suite at &lt;a href="https://binaryconverter.org" rel="noopener noreferrer"&gt;Binary Converter&lt;/a&gt; open in a tab lets you verify pure binary, BCD, and ASCII outputs in seconds without leaving your machine.&lt;/p&gt;

&lt;p&gt;Have you ever run into a BCD vs. pure binary bug while reading sensor or RTC registers? Share your experience below! 👇&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>developer</category>
      <category>computerscience</category>
      <category>programming</category>
    </item>
    <item>
      <title>A Quick Guide to Binary, Hex, Octal, and Base64 Conversions in Everyday Coding</title>
      <dc:creator>Farhan Adil</dc:creator>
      <pubDate>Sat, 28 Nov 2026 09:56:53 +0000</pubDate>
      <link>https://dev.to/farhan_adil1/a-quick-guide-to-binary-hex-octal-and-base64-conversions-in-everyday-coding-48mf</link>
      <guid>https://dev.to/farhan_adil1/a-quick-guide-to-binary-hex-octal-and-base64-conversions-in-everyday-coding-48mf</guid>
      <description>&lt;p&gt;Working with low level data, color codes, file permissions, or API payloads means constantly switching between different number systems and encodings. While modern languages handle most conversions automatically, knowing how these bases relate to each other saves hours when debugging raw bytes or network logs.&lt;/p&gt;

&lt;p&gt;Here is a practical breakdown of the four most common representations developers run into and when to use each one.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Binary (Base 2): The Hardware Layer
&lt;/h3&gt;

&lt;p&gt;Everything inside memory and CPU registers boils down to Base 2, using only &lt;code&gt;0&lt;/code&gt; and &lt;code&gt;1&lt;/code&gt;. Each position represents a power of two, starting from &lt;code&gt;2^0&lt;/code&gt; on the right.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Where you see it:&lt;/strong&gt; Bitwise flags, subnet masks, microcontroller registers, and character encoding checks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quick example:&lt;/strong&gt; The decimal number &lt;code&gt;42&lt;/code&gt; equals &lt;code&gt;00101010&lt;/code&gt; in an 8 bit byte (&lt;code&gt;32 + 8 + 2&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whenever you need to verify raw bit patterns or check how integers map to bits, you can run quick checks with a &lt;a href="https://binaryconverter.org/decimal-to-binary" rel="noopener noreferrer"&gt;Decimal to Binary&lt;/a&gt; tool or reverse raw bit sequences back into readable integers using a &lt;a href="https://binaryconverter.org/binary-to-decimal" rel="noopener noreferrer"&gt;Binary to Decimal&lt;/a&gt; converter.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Hexadecimal (Base 16): Compact Binary for Humans
&lt;/h3&gt;

&lt;p&gt;Reading long strings of 32 or 64 bits is exhausting and error prone. Hexadecimal solves this by grouping &lt;strong&gt;4 binary bits into a single character&lt;/strong&gt; (&lt;code&gt;0&lt;/code&gt; through &lt;code&gt;9&lt;/code&gt; and &lt;code&gt;A&lt;/code&gt; through &lt;code&gt;F&lt;/code&gt;).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Where you see it:&lt;/strong&gt; CSS hex colors (&lt;code&gt;#FF5733&lt;/code&gt;), memory addresses, SHA256 hashes, and MAC addresses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quick example:&lt;/strong&gt; One byte (&lt;code&gt;11111111&lt;/code&gt; in binary) shrinks cleanly to just &lt;code&gt;FF&lt;/code&gt; in hex.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are inspecting memory dumps or color channels and want to see the underlying bit switches, switching values through a &lt;a href="https://binaryconverter.org/hex-to-binary" rel="noopener noreferrer"&gt;Hex to Binary&lt;/a&gt; or &lt;a href="https://binaryconverter.org/binary-to-hex" rel="noopener noreferrer"&gt;Binary to Hex&lt;/a&gt; converter makes bit masking much clearer.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Octal (Base 8): Legacy Systems and Unix Permissions
&lt;/h3&gt;

&lt;p&gt;Octal groups &lt;strong&gt;3 binary bits into a single digit&lt;/strong&gt; (&lt;code&gt;0&lt;/code&gt; through &lt;code&gt;7&lt;/code&gt;). While less common in frontend work today, it remains standard in Unix and Linux environments.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Where you see it:&lt;/strong&gt; File permission commands like &lt;code&gt;chmod 755&lt;/code&gt; or &lt;code&gt;chmod 644&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quick example:&lt;/strong&gt; The permission &lt;code&gt;7&lt;/code&gt; in octal equals &lt;code&gt;111&lt;/code&gt; in binary, meaning Read (&lt;code&gt;4&lt;/code&gt;), Write (&lt;code&gt;2&lt;/code&gt;), and Execute (&lt;code&gt;1&lt;/code&gt;) are all enabled.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can double check permission bitmasks anytime using an &lt;a href="https://binaryconverter.org/octal-to-binary" rel="noopener noreferrer"&gt;Octal to Binary&lt;/a&gt; or &lt;a href="https://binaryconverter.org/binary-to-octal" rel="noopener noreferrer"&gt;Binary to Octal&lt;/a&gt; utility.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Base64: Safely Moving Binary Over Text Protocols
&lt;/h3&gt;

&lt;p&gt;Base64 is an encoding scheme rather than a pure number system. It takes raw binary bytes and translates them into 64 safe ASCII characters so binary data does not break inside JSON, XML, or email payloads.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Where you see it:&lt;/strong&gt; JWT tokens, Data URLs for inline images, and Basic Auth headers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quick example:&lt;/strong&gt; Every 3 bytes (24 bits) of binary data turn into 4 Base64 characters.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When debugging encoded API tokens or payload strings, a &lt;a href="https://binaryconverter.org/base64-to-binary" rel="noopener noreferrer"&gt;Base64 to Binary&lt;/a&gt; or &lt;a href="https://binaryconverter.org/binary-to-base64" rel="noopener noreferrer"&gt;Binary to Base64&lt;/a&gt; converter helps inspect the exact underlying byte stream.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Tip
&lt;/h3&gt;

&lt;p&gt;If you want all of these number systems, ASCII, Unicode, and BCD tools in one fast, distraction free place that runs locally in your browser without sending inputs to any server, bookmark &lt;a href="https://binaryconverter.org" rel="noopener noreferrer"&gt;Binary Converter&lt;/a&gt; for your daily workflow.&lt;/p&gt;

&lt;p&gt;Which number system or encoding format trips you up the most during debugging? Let me know in the comments! 👇&lt;/p&gt;

</description>
      <category>computerscience</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>I built an instant, 100% offline binary &amp; base converter with zero backend dependencies. 🚀</title>
      <dc:creator>Farhan Adil</dc:creator>
      <pubDate>Sun, 08 Nov 2026 15:03:28 +0000</pubDate>
      <link>https://dev.to/farhan_adil1/how-binary-hex-and-decimal-conversion-works-under-the-hood-with-code-examples-2he4</link>
      <guid>https://dev.to/farhan_adil1/how-binary-hex-and-decimal-conversion-works-under-the-hood-with-code-examples-2he4</guid>
      <description>&lt;p&gt;Hey Devs! 👋&lt;/p&gt;

&lt;p&gt;Like many of you, whenever I need to debug network payloads, test bitwise operations, or quickly check a Hex/BCD value, I used to open top Google search results. But most existing converter sites today are full of heavy ads, slow layout shifts, and send simple text queries to external backend servers.&lt;/p&gt;

&lt;p&gt;So I decided to build a lightweight, privacy-first alternative: &lt;a href="//binaryconverter.org"&gt;binaryconverter.org&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🚀 What makes it different?&lt;br&gt;
100% Client-Side &amp;amp; Instant: Everything runs directly inside your browser using vanilla JS. No payload or text string ever leaves your machine or touches a backend server.&lt;/p&gt;

&lt;p&gt;Full PWA Support (Works Offline): Built with Service Workers (sw.js)—you can install it as a desktop/mobile app and perform conversions even when you're completely offline.&lt;/p&gt;

&lt;p&gt;15+ Specialized Base Tools:&lt;/p&gt;

&lt;p&gt;Text ↔ Binary&lt;/p&gt;

&lt;p&gt;Hexadecimal ↔ Decimal ↔ Octal&lt;/p&gt;

&lt;p&gt;BCD (Binary Coded Decimal) &amp;amp; ASCII Lookup&lt;/p&gt;

&lt;p&gt;Clean UI &amp;amp; High Performance: Zero framework bloat, fast load times, and distraction-free layouts built for speed.&lt;/p&gt;

&lt;p&gt;🛠️ Tech Stack Under the Hood&lt;br&gt;
Frontend: Plain HTML5, CSS3, Vanilla JavaScript&lt;/p&gt;

&lt;p&gt;Hosting: Netlify (Edge deployment)&lt;/p&gt;

&lt;p&gt;PWA Engine: Custom Service Worker for Cache-First offline asset management&lt;/p&gt;

&lt;p&gt;💬 Would Love Your Feedback!&lt;br&gt;
I built this specifically for developers, computer science students, and tech enthusiasts.&lt;/p&gt;

&lt;p&gt;Give it a spin at &lt;a href="//binaryconverter.org"&gt;Binary Converter&lt;/a&gt; and let me know:&lt;/p&gt;

&lt;p&gt;What additional conversion modes or features would you like to see?&lt;/p&gt;

&lt;p&gt;Any edge-case bugs you hit during conversion?&lt;/p&gt;

&lt;p&gt;Drop your feedback, feature requests, or thoughts in the comments below! 👇&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>computerscience</category>
      <category>programming</category>
    </item>
    <item>
      <title>How I Built a High-Performance, Treadmill Calorie Core Suite (Vanilla JS)</title>
      <dc:creator>Farhan Adil</dc:creator>
      <pubDate>Thu, 09 Jul 2026 10:23:15 +0000</pubDate>
      <link>https://dev.to/farhan_adil1/how-i-built-a-high-performance-treadmill-calorie-core-suite-vanilla-js-aad</link>
      <guid>https://dev.to/farhan_adil1/how-i-built-a-high-performance-treadmill-calorie-core-suite-vanilla-js-aad</guid>
      <description>&lt;p&gt;Frustrated by slow, bloated online calculators covered in dozens of flashing display ads, I decided to build a high-performance alternative from scratch: &lt;a href="https://treadmillcalc.com/" rel="noopener noreferrer"&gt;Treadmill Calc&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To keep the platform instantly interactive, I intentionally bypassed heavy frameworks and coded the calculation suite entirely in &lt;strong&gt;Vanilla JavaScript&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;The engine uses the exact &lt;strong&gt;American College of Sports Medicine (ACSM)&lt;/strong&gt; metabolic equations to compute raw, scientifically backed calorie expenditure based on weight, speed, duration, and gradient incline.&lt;/p&gt;

&lt;p&gt;Here is the core logic handling the real-time calculations:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
javascript
function calculateTreadmillKcal(weightKg, speedMph, inclinePercent, durationMins) {
    const speedMpm = speedMph * 26.8; 
    const grade = inclinePercent / 100; 
    let vo2 = 0;

    if (speedMph &amp;lt;= 3.7) {
        vo2 = (0.1 * speedMpm) + (1.8 * speedMpm * grade) + 3.5; // Walking
    } else {
        vo2 = (0.2 * speedMpm) + (0.9 * speedMpm * grade) + 3.5; // Running
    }

    const kcalPerMin = (vo2 * weightKg) / 200;
    return parseFloat((kcalPerMin * durationMins).toFixed(1));
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>showdev</category>
      <category>performance</category>
    </item>
    <item>
      <title>How I Built a Free Password Strength Checker (No Passwords Ever Leave Your Browser)</title>
      <dc:creator>Farhan Adil</dc:creator>
      <pubDate>Tue, 20 Jan 2026 14:33:00 +0000</pubDate>
      <link>https://dev.to/farhan_adil1/how-i-built-a-free-password-strength-checker-no-passwords-ever-leave-your-browser-2phe</link>
      <guid>https://dev.to/farhan_adil1/how-i-built-a-free-password-strength-checker-no-passwords-ever-leave-your-browser-2phe</guid>
      <description>&lt;p&gt;Weak passwords are still one of the biggest security risks.&lt;br&gt;
As a small experiment, I built a free password strength checker that runs entirely in the browser.&lt;/p&gt;

&lt;p&gt;What makes it different:&lt;/p&gt;

&lt;p&gt;No passwords are stored or sent to any server&lt;/p&gt;

&lt;p&gt;Uses entropy-based checks, not simple rules&lt;/p&gt;

&lt;p&gt;Works offline once loaded&lt;/p&gt;

&lt;p&gt;Mobile and desktop friendly&lt;/p&gt;

&lt;p&gt;I noticed most tools either feel outdated or push signups.&lt;br&gt;
My goal was to keep it simple, fast, and privacy-first.&lt;/p&gt;

&lt;p&gt;👉 Try the tool here:&lt;br&gt;
&lt;a href="https://passwordgiant.com/" rel="noopener noreferrer"&gt;Password Giant Password Strength Checker&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am also adding a password generator with customizable length and character sets.&lt;/p&gt;

&lt;p&gt;If you are a developer or student, feedback is welcome.&lt;br&gt;
Happy to improve it further.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>cybersecurity</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
