answersLogoWhite

0


Best Answer

All programs and data are stored in binary form so there is nothing to convert in terms of reading binary data. No matter what that data represents (a char, a string, an integral value, a floating point value, or a complex object), it is still just binary data, even when encrypted, and you can interpret it any way you wish.

To read binary data, you need to open the file for binary reading. You then read as much data as you want (in bytes), and then examine the individual bits within the data you've read. For variable length bits (such as when reading 9-bit data), you will need to use a double-buffer, where one buffer reads data in multiples of 8 bits at a time, in the normal manner, while the second buffer masks off the bits to be processed, using a "sliding-window" technique. There are various ways to implement this technique, but the simplest is to use a read buffer size that represents the lowest common factor of 8 and the bit-length. Thus for 9-bit data, you need a buffer that is 72 bits long (9 bytes), or any multiple thereof. The ideal size for alignment purposes on a 32-bit computer is 288 bits (36 bytes), or 576 bits (72 bytes) on a 64-bit system.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How can you read and store the binary digits from a file using c plus plus ie for cryptography?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What the weighted binary code for the base-12 digits using weights of 5421?

0000,0001,0010,0011,0100,0101,0110,0111,1011,1100,1101,1110


Is digital data for wireless communications represented in the same way as standard computer data using the two binary digits 0 and 1?

that's correct.the binary digits are transformed into radio waves then sent.the receiving process does the opposite: radio waves are received and transformed into binary digits


What does binary system mean?

It is a system of representing numbers using only the digits 0 and 1, and in which the place values of digits are powers of 2.


What does computers have to do with math?

They work using lots of 0 and 1, and this two digits are the basic digits of binary number system.


A system of numbers in which each number is shown using only the digits 0 and 1?

binary.


Why is it easier for computers to work with digital over analog information?

because computer is made of flipflops n they are designed using the binary digits only n its easy to manipulate data in binary codes using nly 2 digits ie 0 and 1.


What language consists of only two digits 0 and 1?

Binary code represents text using the binary number system's two digits 1 and 0. The code assigns a bit string to each symbol or instruction. Binary is commonly used for encoding data.


How does a binary system differ from a decimal numbering system?

Binary is base 2, using the digits 0 and 1. Decimal system is base 10 with 0-9.


How did the binary system get its name?

Because it stores information using two digits, 1 and 0, and bi- means two.


How does a computers process binary digits into keyboard characters?

Chracters are represented using binary digit combinations. For example the ASCII American Standard Code for Information Interchange is one such encoding.


Why does a decimal value waste memory space?

Decimal (more formally, binary coded decimal) values store numeric information as digits encoded using the four bit binary equivalents: 0 (0000) to 9 (1001). That means a single byte can hold values between 0 and 99. But simply using the same byte to hold a binary value will yield values between 0 and 255 (or –128 and +127).


What are the numbers in base 2?

Base two is also referred to as the binary number system.In the decimal system we use 10 different digits (0 to 9) to represent numbers. However, all numbers in binary consist of a combination of only 2 different digits; a "0" and/or a "1".All numbers can be represented using only these 2 digits.