index | submit | rank | book

bytes2bits – Bytes to bits

Write a program that converts a quantity in bytes to a quantity in bits.

Input and Output

The input contains several lines each with one integer n where 0 ≤ n < 65 536.

Each line of output should contain a corresponding integer m indicating how many bits are there in n bytes.

Example input

2
360
1024

Example output

16
2880
8192

Scoring

try first: bin2dec dec2bin

try also: bits2bytes

try next: kilobytes

index | submit | rank | book

Copyright © 2020-2021 Rudy Matela
This text is available under the CC BY-SA 4.0 license.
Originally available on cscx.org/bytes2bits