The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
259 views

Benefits of Java ByteArrayInputStream vs byte array?

I have a scenario where my Java process will be receiving a stream of binary data: public class DataHandler { public void handleData(DATA data) { // TODO: Do something with data } } ...
0
votes
2answers
88 views

Does ASCII have a header or footer or anything similar?

I'm working through a problem in Programming Pearls -- specifically, the implementation of a program which sorts a file containing, at most, 10,000,000 integers, each of which is 7 digits long (Column ...
12
votes
4answers
2k views

Is there any danger in writing raw bytes to a file? [closed]

I'm working through a problem in Programming Pearls -- specifically, the implementation of a program which sorts a file containing, at most, 10,000,000 integers (Column 1, Problem 3). Since the book ...
3
votes
5answers
4k views

How do you compress ASCII strings into smaller bytes?

I'm working with an embedded device with a unique protocol that sends messages to other devices and I'm making an application that parses the sent packets. Each packet carries 8 bytes. The protocol is ...
40
votes
12answers
3k views

Is there an alternative to bits?

Is there an alternative to bits as the smallest unit of data? Something that won't be only 0 or 1, but actually hold many possible states in between? Wouldn't it be more natural to store floats like ...
22
votes
11answers
3k views

Why do we still use floats? [duplicate]

I understand why floats served a purpose in the past. And I think I can see why they're useful in some simulation examples today. But I think those example are more exceptional than common. So I ...
3
votes
3answers
697 views

8 bit and 1 byte, is this a valid question to be asked?

I saw these question in our school's past paper, and I'm wondering if this is a valid question. How big is bool in C and C++? A) 1 bit B) 4 bit C) 8 bit D) 1 byte What is ...
31
votes
6answers
11k views

What is the history of why bytes are eight bits?

What where the historical forces at work, the tradeoffs to make, in deciding to use groups of eight bits as the fundamental unit ? There were machines, once upon a time, using other word sizes, ...
-5
votes
1answer
419 views

Why is an operating System denoted as 32 bit or 64 bit [closed]

Why are some operating systems labeled 32-bit and others 64-bit? If the processor is the one doing the actual execution, why does the operating system care about how many bits are used?
0
votes
3answers
306 views

How do I tell a user that bps means bits per second or bytes per second?

I'm writing an application that deals with the network and the hard drive. For the network portion, the application measures in bits per second, while the disk portion measures in bytes per second. ...
2
votes
3answers
4k views

How many bits' address is required for a computer with n bytes of memory?

How many bits of address is required (for the program counter for example) in a byte-addressed computer with 512 Mbyte RAM? What does the formula look like? How is this connected with the fact that ...
2
votes
1answer
2k views

Java default Integer value is int

My code looks like this import java.util.Scanner; public class StudentGrades { public static void main(String[] argv) { Scanner keyboard = new Scanner(System.in); byte q1 = ...