Binary digits

[5, 50, 9000].each { |n|
    say n.as_bin
}

Output:

101
110010
10001100101000