---
title: HEX2BIN – แปลงฐาน 16 เป็นฐาน 2
url: https://www.thepexcel.com/functions/excel/engineering/hex2bin/
type: function-explainer
program: Excel
syntax: "=HEX2BIN(number, [places])"
date: 2025-12-02
updated: 2026-05-31
scores:
  popularity: 3
  difficulty: 5
  usefulness: 4
---

# HEX2BIN – แปลงฐาน 16 เป็นฐาน 2

> HEX2BIN แปลงเลขฐานสิบหก (hexadecimal) เป็นเลขฐานสอง (binary) รองรับค่าลบในรูปแบบ two's complement แล

## คำอธิบาย

HEX2BIN แปลงเลขฐานสิบหก (hexadecimal) เป็นเลขฐานสอง (binary) รองรับค่าลบในรูปแบบ two's complement และกำหนดจำนวนหลักผลลัพธ์ด้วยอาร์กิวเมนต์ places ได้

## Syntax

```excel
=HEX2BIN(number, [places])
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| number | Yes | Text |  | เลขฐานสิบหก |
| places | No | Number | 0 | จำนวนหลัก |

## ตัวอย่าง

### 1. แปลง 'F' เป็นฐานสอง

```excel
=HEX2BIN("F")
```

**ผลลัพธ์:** `1111`

ตัวเลขฐานสิบหก F เท่ากับ 15 ในฐานสิบ และ 1111 ในฐานสอง

### 2. กำหนดจำนวนหลัก

```excel
=HEX2BIN("A", 8)
```

**ผลลัพธ์:** `00001010`

แปลง A ฐานสิบหก เป็น 1010 ฐานสอง แต่บังคับแสดง 8 หลัก

### 3. ค่าติดลบ (Two's complement)

```excel
=HEX2BIN("FFFFFFFFFF")
```

**ผลลัพธ์:** `1111111111`

HEX2BIN รับค่าได้ -512 ถึง 511 ค่าลบต้องเขียนในรูป two's complement 10 หลัก เลขฐานสิบหก FFFFFFFFFF คือ -1 จึงแปลงเป็นฐานสองได้ 1111111111 (ครบ 10 บิตเป็น 1 ทั้งหมด)

## ฟังก์ชันที่เกี่ยวข้อง

- [BIN2HEX – แปลงฐาน 2 เป็นฐาน 16](https://www.thepexcel.com/functions/excel/engineering/bin2hex/)
- [HEX2DEC – แปลงฐาน 16 เป็นฐาน 10](https://www.thepexcel.com/functions/excel/engineering/hex2dec/)
- [HEX2OCT – แปลงเลขฐาน 16 เป็นฐาน 8](https://www.thepexcel.com/functions/excel/engineering/hex2oct/)
- [OCT2BIN – แปลงฐาน 8 เป็นฐาน 2](https://www.thepexcel.com/functions/excel/engineering/oct2bin/)

## แหล่งข้อมูลเพิ่มเติม

- [Official Documentation](https://support.microsoft.com/en-us/office/hex2bin-function-a13aafaa-5737-4920-8424-643e581828c1) _(official)_
- [ExcelJet](https://exceljet.net/excel-functions/excel-hex2bin-function) _(guide)_

---

_Source: [https://www.thepexcel.com/functions/excel/engineering/hex2bin/](https://www.thepexcel.com/functions/excel/engineering/hex2bin/)_
