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
26
votes
5 answers

CALL -151 What did it do on the APPLE ][

A long time ago I had an apple ][ . I remember the command call – 151 But I can not remember what it did ?
Charles Faiga
  • 11,665
  • 25
  • 102
  • 139
11
votes
7 answers

Are there any current non-Harvard architecture microcontrollers?

I have used and like the Atmel ATMEGA and ATTINY series microcontrollers, and think them quite good. One thing I am not terribly fond of though is the fact that they (and Microchip PIC uC family also) are all Harvard machines, meaning I can't really…
Chris D.
  • 639
  • 2
  • 8
  • 18
11
votes
3 answers

How to convert a BufferedImage to 8 bit?

I was looking at the ImageConverter class, trying to figure out how to convert a BufferedImage to 8-bit color, but I have no idea how I would do this. I was also searching around the internet and I could find no simple answer, they were all talking…
Zach Sugano
  • 1,567
  • 5
  • 22
  • 41
9
votes
1 answer

Is the Z80 'Game Boy' CPU 8 or 16 bits?

I was reading a tutorial about creating a Game Boy emulator, I understand that the Game Boy uses an 8-bit CPU, but I can't understand why the Gameboy uses two types of data: bytes (8 bits) and words (16 bits). If the CPU has a capacity of 8 bits,…
Toni
  • 95
  • 6
7
votes
4 answers

How do 8-bit and 16-bit processors access more RAM with two registers?

Something that has always confused me is how 8-bit computers access more than 256 bytes of RAM. I know that it must use two registers, but can any one show me an example of what this would look like in assembly code? Like: mov a, [x] ???
7
votes
2 answers

Converting 8 bit color into RGB value

I'm implementing global illumination in my game engine with "reflective shadow maps". RSM has i.a. color texture. To save memory. I'm packing 24 bit value into 8 bit value. Ok. I know how to pack it. But how do I unpack it? I had idea to create a 1D…
Piotr Joniec
  • 157
  • 1
  • 2
  • 13
6
votes
3 answers

How to convert 24 bit RGB to 8 bit RGB

I was wondering what is the best way to convert a 24-bit RGB color (8 bits per color) into an 8-bit color (2bits Blue, 3 Green, 3 Red). I'd like C code for doing this.
Gootik
  • 526
  • 1
  • 7
  • 18
6
votes
7 answers

how to avoid memory wastage when storing UTF-8 characters (8 bit) in Java character (16 bit). two in one?

I'm afraid I have a question on a detail of a rather oversaturated topic, I searched aroudn a lot, but couldn't find a clear answer to that specific obvious -imho- important, problem: When converting byte[] to String using UTF-8, each byte (8bit)…
ib84
  • 675
  • 5
  • 16
6
votes
1 answer

JS: Efficient way to convert Integer to 8 digit binary?

I know this can be accomplished in different ways, and there are already some example implementations suggested in other answers. So what I'm asking is what is the most efficient in terms of computing way to do it. Self explanatory: var num =…
ferret96
  • 89
  • 1
  • 6
6
votes
3 answers

Overflow and Carry flags

Is it possible to add two signed 8-bit numbers together and set both the carry and overflow bits?
freezie
  • 63
  • 1
  • 3
6
votes
4 answers

8 bit audio samples to 16 bit

This is my "weekend" hobby problem. I have some well-loved single-cycle waveforms from the ROMs of a classic synthesizer. These are 8-bit samples (256 possible values). Because they are only 8 bits, the noise floor is pretty high. This is due to…
Nosredna
  • 83,000
  • 15
  • 95
  • 122
4
votes
1 answer

Opening a file in text mode can lead to data loss in Python: why?

The documentation for codecs.open() mentions that Files are always opened in binary mode, even if no binary mode was specified. This is done to avoid data loss due to encodings using 8-bit values. How can using text mode for a file lead to "data…
Eric O. Lebigot
  • 91,433
  • 48
  • 218
  • 260
4
votes
7 answers

Accessing 8-bit data as 7-bit

I have an array of 100 uint8_t's, which is to be treated as a stream of 800 bits, and dealt with 7 bits at a time. So in other words, if the first element of the 8-bit array holds 0b11001100 and the second holds ob11110000 then when I come to read…
howamith
  • 181
  • 3
  • 15
4
votes
1 answer

How to convert two 8-bits to 16-bits and vice versa in Javascript?

I know this has been asked before, but I have not been able to reach a solution. I apologize if the topic is duplicated, but I think it's not. I have a number extracted from a Uint16Array to convert to a pair of 8-bit numbers and does it well, but…
cucho
  • 75
  • 2
  • 5
4
votes
2 answers

Why doesn't SIFT work for 8 bit images (JPEG) in OpenCV with Python?

I used SIFT for all my other 24 bit JPEG images without any problems, however, the 8-bit one always give me the following error. image is empty or has incorrect depth (!=CV_8U) in function cv::SIFT::operator () Does anyone know how to deal with…
Joseph Yu
  • 133
  • 1
  • 2
  • 8
1
2 3
14 15