Top "Byte" questions

A unit of information usually corresponding to 8 bits.

How can I convert a python urandom to a string?

If I call os.urandom(64), I am given 64 random bytes. With reference to Convert bytes to a Python string I …

python string random python-3.x byte
Download a file over HTTP into a byte array in C#?

I'm trying to read a file that I have a web address for into a byte array. I've been using …

arrays http file download byte
Convert byte array (byte[]) to Image in Java

I have a byte[] that I want to convert to an Image and display the image in a label. The …

java image byte jpeg2000
how to take twos complement of a byte in c++

I am looking at some c++ code and I see: byte b = someByteValue; // take twos complement byte TwosComplement = -b; Is …

c++ byte twos-complement
Problems in declaring a variable as Byte in VB.NET

I'm trying out a program which I found on the net. Why is it necessary to put to curly braces …

.net vb.net variables byte variable-declaration
Convert zero-padded bytes to UTF-8 string

I'm unpacking several structs that contain 's' type fields from C. The fields contain zero-padded UTF-8 strings handled by strncpy …

python unicode utf-8 byte strncpy
System where 1 byte != 8 bit?

All the time I read sentences like don't rely on 1 byte being 8 bit in size use CHAR_BIT instead of 8 …

c++ c byte history computer-architecture
C# Byte[] to BCD and BCD to INT

I have a Hex file created by CashRegister Machine. I have to read this file in. File uses formatting detailed …

c# arrays byte bcd
What is the best way to work around the fact that ALL Java bytes are signed?

In Java, there is no such thing as an unsigned byte. Working with some low level code, occasionally you need …

java byte unsigned signed
Extract LSB bit from a Byte in python

I have a byte in variable 'DATA'. I want to extract the LSB bit out of it and print it. …

python-3.x byte extraction lsb