- 2

Plzz tell me something about this.

The AVL team in client services is trying to wire up a new vehicle modem for testing. Unfortunately assembly is required using a set of wires and bitwise logic gates and they need some help from the development team. Each wire has an identifier (some lowercase letters) and can carry a 16-bit signal (a number from 0 to 65535). A signal is provided to each wire by a gate, another wire, or some specific value. Each wire can only get a signal from one source, but can provide its signal to multiple destinations. A gate provides no signal until all of its inputs have a signal. The included instructions booklet describes how to connect the parts together: x AND y -> z means to connect wires x and y to an AND gate, and then connect its output to wire z. For example: • 123 -> x means that the signal 123 is provided to wire x. • x AND y -> z means that the bitwise AND of wire x and wire y is provided to wire z. • p LSHIFT 2 -> q means that the value from wire p is left-shifted by 2 and then provided to wire q. • NOT e -> f means that the bitwise complement of the value from wire e is provided to wire f. Other possible gates include OR (bitwise OR) and RSHIFT (right-shift). If, for some reason, you'd like to emulate the circuit instead, almost all programming languages (for example, C, JavaScript, or Python) provide operators for these gates. For example, here is a simple circuit: 123 -> x 456 -> y x AND y -> d x OR y -> e x LSHIFT 2 -> f y RSHIFT 2 -> g NOT x -> h NOT y -> i After it is run, these are the signals on the wires: d: 72 e: 507 f: 492 g: 114 h: 65412 i: 65079 x: 123 y: 456 Using the instructions (provided as your question input), what signal is ultimately provided to wire ‘a’?

22nd Aug 2020, 6:22 PM
Siddhant Saxena
Siddhant Saxena - avatar
2 ответов
0
Where is wire 'a' tho?There should be some sort of operation on the resulting signals if I am not wrong or is it just cumulative sum provided to a? rest of other are simple binary operators on a 16 bit value
22nd Aug 2020, 7:25 PM
Abhay
Abhay - avatar
26th Aug 2020, 6:22 AM
Victor de la Fuente
Victor de la Fuente - avatar