# What Is Radix in Data Structure?

//

Angela Bailey

In data structure, a radix is the base or number system used to represent numbers. It determines the number of unique digits (including 0) that can be used to represent values in a positional numeral system. The most common radices used in computer science are binary (base 2), decimal (base 10), octal (base 8), and hexadecimal (base 16).

Binary radix uses only two unique digits, 0 and 1. It is extensively used in computer systems because it aligns well with binary logic and electronic circuitry. In binary, each digit represents a power of 2, with the rightmost digit being the least significant bit (LSB) and the leftmost digit being the most significant bit (MSB).

Decimal radix is the most commonly used number system in everyday life. It uses ten unique digits from 0 to 9. In decimal, each digit represents a power of 10, with the rightmost digit being the ones place and the leftmost digit being the highest place value.

Octal radix uses eight unique digits from 0 to 7. Octal numbers are commonly used as shorthand representations of binary numbers in computer programming. Each octal digit represents three bits of information.

Hexadecimal radix uses sixteen unique digits from 0 to F, where F represents decimal number fifteen. Hexadecimal numbers are commonly used in computer science for representing binary data in a more compact form. Each hexadecimal digit represents four bits of information.

Converting a number from one radix to another is a common operation in computer science. To convert a number from radix A to radix B, you typically need to convert it to decimal first, and then from decimal to the desired radix using division and remainder operations.