RevealTheme logo

مبدل دودویی به هگزادسیمال

اعداد دودویی را به هگزادسیمال تبدیل کنید. هگزادسیمال برای یک مقدار یکسان، ۴ برابر فشرده‌تر از دودویی است.

نحوه استفاده از این ابزار

  1. 1

    Type or paste your binary digits into the input box. Whitespace between groups is fine and gets stripped automatically.

  2. 2

    Read the uppercase hexadecimal result in the box below, which updates instantly as you type.

  3. 3

    Copy the hex value out for use in your code, config, or documentation.

مبدل دودویی به هگزادسیمال چیست؟

دودویی از مبنای ۲ (ارقام ۰ و ۱) استفاده می‌کند؛ هگزادسیمال از مبنای ۱۶ (ارقام 0-9 و A-F) بهره می‌برد. هر رقم هگزادسیمال دقیقاً با ۴ رقم دودویی متناظر است، بنابراین هگزادسیمال راهی بسیار فشرده‌تر برای نوشتن اعداد دودویی بزرگ است. این تبدیل برای برنامه‌نویسی، اشکال‌زدایی محتوای حافظه (memory dump) و خواندن کد ماشین بنیادی است.

موارد استفاده رایج

  • Shorten a long binary literal from a datasheet or register map into compact hex for your firmware code.

  • Translate a binary permission or flag mask into the hex form your config file or API expects.

  • Check a binary value by hand against the hex shown in a debugger or memory viewer.

  • Convert binary output from a logic exercise or homework problem into hex to verify your answer.

  • Turn a binary representation of an RGB channel into the hex pair used in CSS color codes.

  • Prepare hex constants for embedded registers when your reference material only lists the bit pattern in binary.

پرسش‌های متداول

چرا هگزادسیمال بر دودویی ترجیح داده می‌شود؟▼
هگزادسیمال برای یک مقدار یکسان ۴ برابر کوتاه‌تر است، برای انسان‌ها خواندنش آسان‌تر است و هنوز به‌طور تمیز به دودویی نگاشت می‌شود.

ابزارهای مرتبط