---
title: "Convert (10101)gray to decimal"
subject: "Digital Logic"
chapter: 1
key: "semester_3/digital_logic:convert-gray-10101-decimal"
source: https://www.bctengineer.com/q/semester_3/digital_logic/convert-gray-10101-decimal
site: BCT Engineering
---

# Convert (10101)gray to decimal

Digital Logic · Chapter 1: Introduction

- Asked in: 2080 Bhadra, 1.5 marks
- Video: [Gray Code in Digital Electronics Tutorial - Gray code to Binary and Binary to Gray code in Hindi](https://www.youtube.com/watch?v=wymxUS8NWNc) — CS Engineering Gyan
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_3/digital_logic/convert-gray-10101-decimal
- Whole chapter: https://www.bctengineer.com/md/semester_3/digital_logic/chapter-1

## Question

Convert (10101)gray = (?)₁₀.

## Short answer

Convert Gray to binary by copying the MSB and XORing each successive bit: 1,1⊕0=1, 1⊕1=0, 0⊕0=0, 0⊕1=1 gives 11001₂. Decimal value is 16+8+1=25, so (25)₁₀.

## Answer

Gray to binary: copy the MSB; each next binary bit = previous binary bit ⊕ current Gray bit.

$B = 1,\ 1\oplus0 = 1,\ 1\oplus1 = 0,\ 0\oplus0 = 0,\ 0\oplus1 = 1$ → $(11001)_2$

$(11001)_2 = 16 + 8 + 1 = 25$

**Answer: $(10101)_{Gray} = (25)_{10}$**

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. How is Gray converted to decimal?
   A. Add weights of the Gray bits directly
   B. Convert to binary first, then to decimal
   C. Invert all bits
   D. Convert straight to octal
   Answer: B. Gray is unweighted. (Key point: First step)

2. What is (10101) Gray in binary?
   A. 10101
   B. 11111
   C. 11001
   D. 01110
   Answer: C. 1; 1^0=1; 1^1=0; 0^0=0; 0^1=1. (Key point: Binary result)

3. What is 11001 in decimal?
   A. 21
   B. 27
   C. 19
   D. 25
   Answer: D. 16 + 8 + 1. (Key point: Decimal)

## Related in Digital Logic

- [Convert 37.432 decimal to binary](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Aconvert-37-432-binary) — Digital Logic, chapter 1
- [Convert octal 623.77 to decimal, binary, hex](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Aconvert-octal-623-77) — Digital Logic, chapter 1
- [Gray vs binary code, convert (10110)₂ to Gray](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Agray-vs-binary-convert-10110) — Digital Logic, chapter 1
- [Convert (101001001)₂ to Gray](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Aconvert-binary-to-gray-101001001) — Digital Logic, chapter 1
- [Convert (19)₁₀ to Gray](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Aconvert-19-gray) — Digital Logic, chapter 1
- [Convert (110111)gray to binary](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Aconvert-gray-110111-binary) — Digital Logic, chapter 1

## Related in other subjects

- [Decimal to binary conversion](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Adecimal-to-binary) — Computer Programming, chapter 5
- [Binary to decimal in FORTRAN](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Afortran-binary-to-decimal) — Computer Programming, chapter 11
