         }
 
         return violations
+    }
+
+    private func isDecimal(number: String) -> Bool {
+        let lowercased = number.lowercased()
+        let prefixes = ["0x", "0o", "0b"]
+
+        return prefixes.filter { lowercased.hasPrefix($0) }.isEmpty
     }
 
     private func isValid(number: String, reversed: Bool) -> Bool {

    public static let description = RuleDescription(
        identifier: "number_separator",
        name: "Number Separator",
        description: "Underscores should be used as thousand separator in large numbers.",
        nonTriggeringExamples: [
            "let foo = 100",
            "let foo = 1_000",
            "let foo = 1_000_000",
            "let foo = 1.000_1",
            "let foo = 1_000_000.000_000_1"
        ],
        triggeringExamples: [
            "let foo = ↓10_0",

    public func validateFile(_ file: File) -> [StyleViolation] {
        let numberTokens = file.syntaxMap.tokens.filter { SyntaxKind(rawValue: $0.type) == .number }
        let violations = numberTokens.filter { token in
            guard let content = contentFrom(file: file, token: token),
                isDecimal(number: content) else {
                    return false
            }

            let components = content.components(separatedBy: ".")
