2022 Developer Survey is open! Take survey.

Questions tagged [octal]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
22 votes
3 answers

Why do so many languages treat numbers starting with 0 as octal?

I've read Where are octals useful? and it seems like octals are something that were once upon a time useful. Many languages treat numbers preceding with a 0 as octal, so the literal 010 is actually 8....
user avatar
2 votes
2 answers

Which numeral systems are useful in computer science?

I am wondering which numeral system different programmers are using, or would use if their language has support for them. As an example, in C++ we can use: Octal by prefixing with 0 (e.g. 0377) ...
user avatar
  • 370
39 votes
11 answers

Where are octals useful? [closed]

I just banged my head against the table for some 20 minutes looking at a totally weird bug in PHP, and then I realized there's octal. The <%(*&#> octal. In short, I padded some literals with ...
user avatar
  • 1,010