41 votes
Accepted

Where are registers and what do they look like?

I still don’t understand what a register physically is... Where on a processor is it? What do they look like? How big are they? Physically it is made from the same structures that make up all the ...
user avatar
  • 51.1k
33 votes
Accepted

What stops an assembly program from crashing the operating system?

In the end, all programs are machine code, regardless of whether the source language was assembler or a high-level language. The important thing is that there are hardware mechanisms that limit what ...
user avatar
  • 164k
32 votes

Where are registers and what do they look like?

You've got most of it down. Let's start here: there are billions of transistors inside a computer's processor. Many of those transistors are used to create registers. Here's a basic description of the ...
user avatar
  • 20.2k
23 votes
Accepted

How can I access more than 15 addresses of data from my 8 bit incomplete computer?

the half of the byte in memory is the opcode and other half is the address Well, that's one way of doing it, but there are lots of ways of doing it. Instructions don't have to contain the address. ...
user avatar
  • 45k
20 votes
Accepted

What does banking mean when applied to registers?

The word banking is used in two different senses when applied to registers. Banked Registers for Interrupt Handling The sense with which the StackOverflow question is concerned is similar to the ...
15 votes

What prevents the construction of a CPU with all necessary memory represented in registers?

Two factors work against your idea: the optimal chip production processes for (D)RAM and logic (CPU) are different. Combining both on the same chip leads to compromises, and the result is far less ...
user avatar
14 votes
Accepted

Finite State Machine FSM

Rom(=Read only memory) is a brute force (=absolutely non-minimized) way to implement a combinatoric circuit. Current state bits and inputs together are address, the data stored into that address ...
user avatar
  • 21.2k
13 votes

What is RCC in embedded C using registers? A register, or a pointer to a register, or something else?

Neither, really. And this is just standard C, nothing specifically to do with an embedded environment. It might be best to think of RCC as a pointer which points to ...
user avatar
  • 87.2k
11 votes
Accepted

Setup Time, Hold Time - What is the underlying principle for having them?

You're forgetting a couple of important facts: A flip-flop isn't a single atomic gate, but made up of multiple gates. It takes time for a signal to pass through a gate (or propagate). There is no ...
user avatar
  • 55.4k
11 votes
Accepted

What is this array-like notation of registers in datasheets?

Those denote the bits within the register. The bits are number 7, 6, 5, 4, 3, 2, 1, 0 so register 0xF4 is build up: ...
user avatar
10 votes
Accepted

What is the difference between registers, flip flops and latches?

Flip-flops are single bit devices with two stable states. The outputs are typically Q and \$\mathsf{\small \overline{\text{Q}}} \$. There are several kinds, here are probably the most common: SR ...
user avatar
  • 46.9k
10 votes

What stops an assembly program from crashing the operating system?

Many multitasking operating systems use a data structure called a Process Control Block (PCB) to take care of the register overwrite problem. When you run your code, the OS creates a new process to ...
user avatar
  • 121
9 votes
Accepted

MSP430 RAM protection

Can anyone explain to me what a strange protection if the password(code) 5Ah is known? It protects you from random modification by runaway code, e.g. on stack overflow. Why RCKEY always read as ...
user avatar
  • 9,600
8 votes
Accepted

Clearing Flag Bits By Writing 1

No, because then you could possibly clear other bits you didn't intend to by accident. It's a little hard to verbalize, but it is very easy to write a 0 simply by, well, writing a 0. You must ...
user avatar
8 votes

8-Bit stereo audio R-2R DAC, is this a right way to do it?

Yes, this is exactly the right place to ask your question. Yes, R-2R topography is the simplest to design (and I think best) way to make a homebrew DAC (wkthout using PWM). As for challenging yourself,...
8 votes

What prevents the construction of a CPU with all necessary memory represented in registers?

There is insufficient room on the CPU die to fit such a vast amount of memory, current RAM memory relies on DIMMs with multiple chips. The cost is also an issue, CPU die space is more expensive ...
user avatar
8 votes

Processing ADC conversion result: DMA vs Processor Registers

If you just write a function that reads the ADC result into a variable, does some math on it, and then writes the result to PWM, and if you use a decent compiler with optimization turned up, then the ...
user avatar
  • 35.8k
8 votes
Accepted

Flip-flop vs latch: Do flip-flops have an edge detector integrated?

Each digital circuit can only work with a given amount of capacitance load which is given by the logical effort and its fan-out. If you connect too many blocks (latches in your case) at the output of ...
user avatar
  • 3,174
7 votes

Microcontroller bit information for the Core and different peripherals

The ‘bitness’ of a cpu is a disputed topic. My take is the width of the ALU and data path. The fact that the Z80 is believed to be an 8bit cpu but had only a 4 bit ALU contradicts this. Your chip has ...
user avatar
  • 5,352
7 votes

What is RCC in embedded C using registers? A register, or a pointer to a register, or something else?

The datasheet you linked refers to the registers by their name because it is a hardware documentation. In this architecture the internal registers are memory mapped, meaning that the processor read/...
user avatar
  • 6,103
6 votes
Accepted

Does Registers and RAM are same kind of memory?

There is DRAM which uses a capacitor to store a charge to represent the stored bit. A row of transistors is used to connect a row of capacitors to the read/write circuitry to put the data into a set ...
user avatar
6 votes
Accepted

Verilog register output: reg or wire?

The way to choose how to declare your signal is not by how it will be physically instantiated, but by how you will syntactically assign its value. If the signal is driven by assignments in a ...
user avatar
  • 121k
6 votes
Accepted

Manually storing the stack pointer rather than using push and pop (Assembly)

These instruction sequences are not equivalent, they are 4 different ways of implementing stacks. A is a top-down stack where the stack pointer addresses the most recent value. B is a top-down stack ...
user avatar
  • 2,389
6 votes

Finite State Machine FSM

This look like a general representation of sequential logic. It could be Read Only Memory: Any boolean function or logic gates combination can be implemented as a look-up table, and look-up tables are ...
user avatar
  • 822
6 votes

Processing ADC conversion result: DMA vs Processor Registers

My question is, since i have to put the conversion result into CPU to be processed anyhow, cant i just store it directly in processor registers without involving DMA or SRAM at all and process is ...
user avatar
  • 2,341
5 votes
Accepted

Eliminating Signal Race Hazard in an IC dynamic latch/register!

Yes, if you replaced the NMOS transistors with full transmission gates, where the P and N transistor are on opposite clock phases, then you will have a race problem. Suppose your two clock phases are ...
user avatar
  • 8,209
5 votes
Accepted

Microcontroller memory write cycles

Modern processor architectures allow you to address a contiguous memory space with the same data bus, even when you are accessing multiple types of memory (e.g. RAM, ROM, and Flash). As it turns out, ...
user avatar
  • 624
5 votes
Accepted

Is a hardware register the same as a processor register?

A processor register is a storage element inside the processor which is used to hold numeric values, addresses, status or control bits which are involved in internal processor operations. A hardware ...
user avatar
  • 51.1k
5 votes

variable should not be used in output port connection

Even if the c output of bottom1 is produced by a flip-flop, in top_ver you are not assigning ...
user avatar
  • 121k

Only top scored, non community-wiki answers of a minimum length are eligible