Use the valueOf() method in Java to copy char array to string. You can also use the copyValueOf() method, which represents the character sequence in the array specified. Here, you can specify the part of array to be copied.Let us first create a character array.char[] arr = { 'p', 'q', 'r', 's' };The method valueOf() will convert the entire array into a string.String str = String.valueOf(arr);The following is an example.Example Live Demopublic class Demo { public static void main(String []args) { char[] arr = { 'p', 'q', 'r', 's' }; String str = String.valueOf(arr); ... Read More
To store Unicode in a char variable, simply create a char variable.char c;Now assign unicode.char c = '\u00AB';The following is the complete example that shows what will get displayed: when Unicode is stored in a char variable and displayed.Example Live Demopublic class Demo { public static void main(String []args) { int a = 79; System.out.println(a); char b = (char) a; System.out.println(b); char c = '\u00AB'; System.out.println(c); } }Output79 O «
In this program, we will see how to add a block of data using the 8085 microprocessor.Problem StatementWrite 8085 Assembly language program to add N 1-byte numbers. The value of N is provided.DiscussionIn this problem, we are using location 8000H to hold the length of the block. The main block is stored from address 8010H. We are storing the result at location 9000H and 9001H. The 9000H holding the lower byte, and 9001H is holding the upper byte.Repeatedly we are taking the number from the memory, then adding it with the accumulator and increase the register E content when carry ... Read More
There can be no doubt about the critical role that community media can play in strengthening democracy at the grass-root level. For most folks in urban areas, especially in Tier I, II and even III cities this issue might not generate much interest, but for those in the smaller towns and villages, this is one issue that will spark immediate interest. That's because folks living in such areas that are classified as rural, don't take a lot of things for granted like their counterparts in cities do.Keep An Insight of the Local PoliticsMost of us in cities don't even know ... Read More
Using 16-bit address, 8085 can access one of the 216= 64K locations. As a single hexadecimal digit can be expressed in4-bit notation so, in 8085, memory address can be expressed using four hexadecimal digits. Similarly, for convenience, we can represent all 8085 CPU registers as A, B, C etc. using binary notations. Internally 8085 specifies these registers using 0s and 1s only. So3-bits are just enough to represent a register. The 3-bit register codes for the registers of 8085 are shown in the following tableWith 3-bit register code, eight registers can be specified in maximum as 23= 8. On the ... Read More
In this mode, the 8/16-bit data is specified in the instruction itself as one of its operand. For example MVI E, ABH: means ABH is copied into register A. Here the operand is immediately available in the instruction.MVI E ABHBeforeAfter(A)Any valueABHAs example, if we consider instruction MVI E, ABH then it means that ABH will be moved or copied to the register E. And, as a result, the previous value of E will get overwritten.AddressHex CodesMnemonicComment20001EMVI E, ABHE ← ABH2001ABABH as operandThis instruction will have seven T-states as shown below.Summary − So this instruction MVI E, ABH requires 2-Bytes, 2-Machine ... Read More
Recycled plastic or for that matter, any plastic when mixed with the bitumen used to build asphalt roads tend to make the roads stronger and more durable. Considering the total number of roads that are already there and newer roads that will be built in a huge country like India, the total amount of plastic waste generated by the country is way too much to be absorbed entirely in this road building and repairing activity.Hence, building roads with recycled waste plastic can be part of the overall plastic recycling efforts but on its own, it can't absorb all of the ... Read More
In this mode, the data is copied from one register to another. For example, MOV A, B: means data in register B is copied to register A.MOV E, HIt occupies only 1-Byte in memory. MOV E, H is an example instruction of this type. It is a 1-Byte instruction. Suppose E register content is AB H, and H register content is 9C H. When the 8085 executes this instruction, the contents of E register will change to 9C H.This is shown as follows.BeforeAfter(E)ABH9CH(H)9CH9CHAddressHex CodesMnemonicComment20045CMOV E, HE ← HNote that H register’s content has not been changed at all. Although Intel has called ... Read More
In this mode, the data is directly copied from the given address to the register. This absolute addressing mode is also called a direct addressing mode. For example LDA 3000H: means the data at address 3000H is copied to register A.LDA 4050HLet us consider LDA 4050 Has an example instruction of this type. It is a 3-Byte instruction. The initial content of memory address 4050H is ABH. initial accumulator content is CDH. As after execution A will be initialized with value ABH. Memory location 4050H will still remain with the content ABH. The results of the execution of this instruction ... Read More
8085 microprocessor, consists of five interrupt input pins named as RST 5.5, RST 6.5, RST7.5, INTR, and TRAP respectively. When there are a maximum of five I/O devices they want to perform driven interrupt data transfer, which is connected to the five interrupt input pins. Now considering the case where there are more than five I/O devices which would like to perform an interrupt driven data transfer scheme. Here for some pins termed as an interrupt, we use more than one I/O device to the process. Most of the microprocessors nowadays have the configuration of these interrupt input pins. There ... Read More