# Primitive(Octal,Hexadecimal)

Vishnu Prakash

Ranch Hand

Posts: 1026

garima_cs

Greenhorn

Posts: 1

Alton Hernandez

Ranch Hand

Posts: 443

Tony Morris

Ranch Hand

Posts: 1608

posted 10 years ago

- 0

Octal is a base-8 number system.

The 8 digits used to create an octal representation are {0,1,2,3,4,5,6,7}.

Clearly, 8 is not permitted in an octal representation, hence, compile-time error.

Hexadecimal is a base-16 number system.

The 8 digits used to create a hexadecimal representation are {0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F}.

Clearly, both 1 and 0 are permitted in a hexadecimal representation, hence, no compile-time error.

Decimal is a base-10 number system.

The 10 digits used to create a decimal representation are {0,1,2,3,4,5,6,7,8,9}.

Binary is a base-2 number system.

The 2 digits used to create a binary representation are {0,1}.

...

The 8 digits used to create an octal representation are {0,1,2,3,4,5,6,7}.

Clearly, 8 is not permitted in an octal representation, hence, compile-time error.

Hexadecimal is a base-16 number system.

The 8 digits used to create a hexadecimal representation are {0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F}.

Clearly, both 1 and 0 are permitted in a hexadecimal representation, hence, no compile-time error.

Decimal is a base-10 number system.

The 10 digits used to create a decimal representation are {0,1,2,3,4,5,6,7,8,9}.

Binary is a base-2 number system.

The 2 digits used to create a binary representation are {0,1}.

...

I agree. Here's the link: http://aspose.com/file-tools |