Questions tagged [8-bit]

In computer architecture, 8-bit integers, memory addresses, or other data units are those that are at most 8 bits (1 octet) wide. Also, 8-bit CPU and ALU architectures are those that are based on registers, address buses, or data buses of that size. 8-bit is also a term given to a generation of computers in which 8-bit processors are the norm.

An 8-bit number has 2^8 = 256 possible states, 8 bits is one which is why computers with this architecture use bytes as a measurement of storage, for example you can have 64 gigabytes or 64000000000 bytes of memory (RAM).

Related tags:

215 questions
2
votes
0 answers

Implementing a 8-bit bidirectional shift register in VHDL

I'm trying to implement a 8-bit bidirectional shift register in VHDl but it's not working properly, because when I am simulating my project with the testbench, I end up with this I'm struggling with the ENABLE of each flip-flop that has to be…
Edaj Mai
  • 51
  • 4
2
votes
2 answers

MPLAB X + XC8 break at wrong line

I've encountered a very annoying problem that has cost a lot of time for several months now. I have a project in MPLAB X. When I use a line-breakpoint it does not break on the right line at all when debugging my project. I am using MPLAB X…
2
votes
1 answer

Why is vsprintf() bit-shifting an 8-bit number?

I'm using the Keil Cx51 compiler on an 8-bit EFM8 MCU. If I have a function, foo(), like this: xdata char buf[32]; void foo(char *msg, ...) { va_list args; va_start (args, msg); vsprintf(buf, msg, args); va_end(args); } And I use…
Ed King
  • 1,833
  • 1
  • 15
  • 32
2
votes
1 answer

Hash function for 8 / 16 bit "graphics" on 8 bit processor

For an implementation of coherent noise (similar to Perlin noise), I'm looking for a hash function suitable for graphics. I don't need it to be in any way cryptographic, and really, I don't even need it to be a super brilliant hash. I just want to…
Benjohn
  • 13,228
  • 9
  • 65
  • 127
2
votes
1 answer

Convert 8bit MIME message to quoted-printable

What is the easiest way to convert a MIME e-mail containing raw 8bit parts to a RFC822 compliant message containing only 7bit parts ? The parts have to be automatically converted to "Content-Transfer-Encoding: quoted-printable". My app is developed…
Antares
  • 177
  • 2
  • 12
2
votes
1 answer

How 8 bit arithmetic is done in Tensorflow?

This TensorFlow guide gives some insights on 8 bit representation of the neural network weight and activations. It maps the range from min-max in float32 to 8bit format by mapping min value in float32 to 0 in int8 and max value to 255. This means…
gopal_hegde
  • 43
  • 1
  • 5
2
votes
1 answer

Python subprocess gives wrong value (gives 8bit value instead of 64 bit)

I'm testing subprocess option in Python. I wrote simple code in C and I want run it by subprocess in Python. This is how it looks : C code example.c (first I execute code and then in subprocess I'm using executable file) : #include int…
BengBeng
  • 127
  • 2
  • 8
2
votes
2 answers

Size of int on 8-bit machines

The ISO C standard states that A "plain" int object has the natural size suggested by the architecture of the execution environment However, it is also guaranteed that int is at least as large as short, which is at least 16 bits in size. The natural…
Orion
  • 1,157
  • 9
  • 18
2
votes
2 answers

Ascii control characters SOH, DLE, STX, ETX : How to escape binary data over a UART?

I want a simple, light-weight way for two basic 8-bit MCUs to talk to each other over an 8-bit UART connection, sending both ASCII characters as 8-bit values, and binary data as 8-bit values. I would rather not re-invent the wheel, so I'm wondering…
Jodes
  • 14,118
  • 26
  • 97
  • 156
2
votes
2 answers

How does a computer distinguish between Data and Instructions?

I watched a video on an 8-bit pc being fed a program - manually, using physics switches. The fed program was: MAIN: 0000 0001 0100 # 0 = LDA [4] 0001 0010 0101 # 1 = ADD [5] 0010 0101 0000 # 2 = OUT 0011 1111 0000 # 3…
user6765872
2
votes
1 answer

OpenGL: Is the precision of GL_R11F_G11F_B10F good for 8bit RGB images?

From "Image Format", we see: An 11-bit float has no sign-bit; it has 6 bits of mantissa and 5 bits of exponent. From "Half-precision floating-point format", we can deduct that: The relative precision of 11-bit float is 2^(-6), which is 1/64 But…
user1914692
  • 3,033
  • 5
  • 36
  • 61
2
votes
2 answers

Address 0 being overwritten by NULL pointer on HCS08

On my 8-bit Freescale HCS08 micro, whenever I call a library function that returns values to pointers I pass it, and I don't really want them, I threw in a NULL, e.g. UART_SendBlock((char *)txstr, strlen(txstr), NULL); The type of the last argument…
Nick T
  • 25,754
  • 12
  • 83
  • 121
2
votes
2 answers

Hexadecimal: Set an 8-bit byte in an int

In Java: I have a 32-bit number given to me in hexadecimal form. I'm given a specific byte number (0-3, 0 for least-significant byte) and told that I need to replace that byte with another byte also given to me in hexadecimal form. Ex: 32-bit number…
Myron King
  • 33
  • 4
2
votes
1 answer

Having 8-bit and 16-bit views on the same data?

Problem I'm working on a video game emulator using C++. The memory is represented by an array of uint8_t values. Often, I also need to access the contents of this memory as 16-bit values (two consecutive 8-bit values). I have something that looks…
merwaaan
  • 123
  • 3
2
votes
1 answer

How to handle >1000 character lines in 8bit mime

When using 8BITMIME smtp, you can set Content-Transfer-Encoding: 8bit in Mime messages and send text without encoding. Except, there is still a line limit of 1000 octets (plus the line endings should all be ) When my library gets arbitrary…
Peter Smit
  • 27,696
  • 33
  • 111
  • 170