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
3
votes
10 answers

tinyAVR: best known multiplication routines for 8-bit and 16-bit factors?

"Faster than avr200b.asm"? The mpy8u-routine from avr200b.asm for those processors of Atmel's AVR family that do not implement any of the MUL instructions seems pretty generic, but mpy16u looks sloppy for rotating both lower result bytes 16 times…
greybeard
  • 2,249
  • 8
  • 30
  • 66
3
votes
1 answer

Subtracting 8-bit integers in Python

I'm trying to use Python to calculate a checksum by repeatedly subtracting a series of 8 bit values. However, I don't know how to do this in Python. In context: I have the following C code I'm trying to convert to Python: #define uint8_t unsigned…
midrare
  • 2,371
  • 28
  • 48
3
votes
1 answer

Convert an array of 8-bit values to wav file in PHP

I have an array of 8-bit values which I have received from a microprocessor. I am looking to turn those values into a wav file using PHP. I found some examples, like this or this, that work in Java and C# but they all seem to leverage existing…
BannerMatt
  • 43
  • 5
3
votes
2 answers

8-bit FFT for CPU architectures?

I am looking for an FFT engine that can handle 8-bit real to complex transforms (of size 65K). The need for this is to accelerate a real-time signal processing engine. It is currently limited by 8-bit -> FP32 and FP32 -> 8-bit conversions, as well…
3
votes
3 answers

Difference between C 8 bit 16-bit 32-bit compilers

This question may be redundant, but I didn't found exact answer. What is the Difference between C 8 bit 16-bit 32-bit compilers. how the .exe differ generated by different compilers for same code...........
krishna
  • 3,148
  • 5
  • 19
  • 24
3
votes
1 answer

creating a custom getColor(byte r, byte g, byte b) method

i have a simple byte array that i want to take colours from. My plan was to have three bits from red, three bits for green, and two bits for blue. 8-bit. I think the colours are right: Please correct me if i'm wrong, byte[] colours = new…
thetheodor
  • 248
  • 2
  • 22
3
votes
1 answer

What is this variable-length integer encoding?

I am documenting an old file format and have stumped myself with the following issue. It seems to be that integers are variable-length encoded, with numbers <= 0x7F encoded in a single byte, but >= 0x80 are encoded in two bytes. An example set of…
Aidan Steele
  • 10,999
  • 6
  • 38
  • 59
3
votes
1 answer

cv::Mat of large integers

I am struggling with putting large integers, such as 2942584, in a cv Mat. The only type accepting it was CV_8UC1, but it changes the value from 2942584 to 120 (well in 8 bits obviously). But is there anyway to have the original value in a cv…
George
  • 769
  • 4
  • 11
  • 31
2
votes
2 answers

Can anyone tell me the name of the old 8 bit processor used most for emulator beginners?

I remember a few years ago writing an emulator for an 8 bit processor, which IIRC, never really existed. It was thought up by someone in order to write a emulator, and was referenced a lot for beginners in the field of emulation. I lost the code…
Caleb Stewart
  • 643
  • 6
  • 21
2
votes
3 answers

What is an 8-bit register on a desktop cpu?

Reading through the following instruction table manual I see that integer multiplication is often much faster for 8-bit registers. In the context of a normal desktop cpu, what does 8-bit register mean? That the value stored within ie a 32-bit…
porgarmingduod
  • 7,668
  • 10
  • 50
  • 83
2
votes
1 answer

GCD (Greatest Common Divisor) for two 16-bit numbers

The goal here is to find GCD for two 16-bit numbers stored in little-endian notation. The numbers are stored in the following memory cells: first number: 0x3000-0x3001 seconds number: 0x4000-0x4001 the result should go into: 0x5000-0x5001 The…
HTF
  • 6,632
  • 6
  • 30
  • 49
2
votes
1 answer

Why does allowing for recursion make C slower/inefficient on 8-bit CPUs

Answers to this question about compiler efficiency for 8-bit CPUs seem to imply that allowing for recursion makes the C language inefficient on these architectures. I don't understand how recursive function calling (of the same function) is…
Kingsley
  • 14,398
  • 5
  • 31
  • 53
2
votes
2 answers

Implementing 8bit adder in python

I've implemented an 8bit adder in python as follows: from gates import AND, OR, XOR from utils import number_to_binary, binary_to_number def EightBitAdder(s1='110101', s2='00010', carry_in=0): # Limit to 8 bits s1 = s1[-8:].zfill(8) s2…
carl.hiass
  • 1,526
  • 1
  • 6
  • 26
2
votes
1 answer

Converting integer to 8-bit ASCII characters, NOT Unicode in Python 3

I've been working on a project where I'm encoding numbers as characters. Being used to C++, I assumed I could just use any 8bit number and cast it to a character. However, python's chr() function is returning Unicode characters, which aren't 8-bit,…
Vlad2000Andrei
  • 75
  • 1
  • 2
  • 6
2
votes
1 answer

Combining 8 high bits and 8 low bits in javascript

I'm sending a water depth in mm to my NodeRed server where I'm currently attempting to reconstruct a 16-bit Int that has been split into 8 high bits and 8 low bits. I've tried just storing the high bits in a var and shifting them left 8 spaces and…
Ben Sefton
  • 938
  • 6
  • 10
1 2
3
14 15